Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Catch crs transform exception
  • Loading branch information
mhugent committed Jun 7, 2021
1 parent ca29531 commit 8f6fec7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 8f6fec7

Please sign in to comment.