File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -139,11 +139,19 @@ void QgsQuickPositionKit::updateProjectedPosition()
139
139
return ;
140
140
141
141
QgsPointXY srcPoint = QgsPointXY ( mPosition .x (), mPosition .y () );
142
- QgsPointXY projectedPositionXY = QgsQuickUtils::transformPoint (
143
- positionCRS (),
144
- mMapSettings ->destinationCrs (),
145
- mMapSettings ->transformContext (),
146
- srcPoint );
142
+ QgsPointXY projectedPositionXY = srcPoint;
143
+ try
144
+ {
145
+ projectedPositionXY = QgsQuickUtils::transformPoint (
146
+ positionCRS (),
147
+ mMapSettings ->destinationCrs (),
148
+ mMapSettings ->transformContext (),
149
+ srcPoint );
150
+ }
151
+ catch ( const QgsCsException & )
152
+ {
153
+ QgsDebugMsg ( QStringLiteral ( " Failed to transform GPS position: " ) + srcPoint.toString () );
154
+ }
147
155
148
156
QgsPoint projectedPosition ( projectedPositionXY );
149
157
projectedPosition.addZValue ( mPosition .z () );
You can’t perform that action at this time.
0 commit comments