Skip to content
Permalink
Browse files
Catch crs transform exception
  • Loading branch information
mhugent committed Jun 7, 2021
1 parent ca29531 commit 8f6fec7678361f17ac2ec4e77855896322ba52c1
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/server/services/wms/qgswmsrenderer.cpp
@@ -3274,7 +3274,14 @@ namespace QgsWms
if ( mapSettings.destinationCrs() != annotation->mapPositionCrs() )
{
QgsCoordinateTransform coordTransform( annotation->mapPositionCrs(), mapSettings.destinationCrs(), mapSettings.transformContext() );
mapPos = coordTransform.transform( mapPos );
try
{
mapPos = coordTransform.transform( mapPos );
}
catch ( const QgsCsException &e )
{
QgsMessageLog::logMessage( QStringLiteral( "Error transforming coordinates of annotation item: %1" ).arg( e.what() ) );
}
}
const QgsPointXY devicePos = mapSettings.mapToPixel().transform( mapPos );
offsetX = devicePos.x();

0 comments on commit 8f6fec7

Please sign in to comment.