Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix WMS identify when using "Feature" format and the layer has named CRS
(cherry picked from commit 9ef91ea)
  • Loading branch information
wonder-sk committed Oct 28, 2016
1 parent 80e820f commit f365206
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -2677,7 +2677,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
QString crsType = result.property( "crs" ).property( "type" ).toString();
QString crsText;
if ( crsType == "name" )
crsText = result.property( "crs" ).property( "name" ).toString();
crsText = result.property( "crs" ).property( "properties" ).property( "name" ).toString();
else if ( crsType == "EPSG" )
crsText = QString( "%1:%2" ).arg( crsType, result.property( "crs" ).property( "properties" ).property( "code" ).toString() );
else
Expand Down Expand Up @@ -2773,6 +2773,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
catch ( const QString &err )
{
QgsDebugMsg( QString( "JSON error: %1\nResult: %2" ).arg( err, QString::fromUtf8( mIdentifyResultBodies.value( jsonPart ) ) ) );
results.insert( results.size(), err ); // string returned for format type "feature" means error
}

delete coordinateTransform;
Expand Down

0 comments on commit f365206

Please sign in to comment.