Skip to content

Commit

Permalink
Fix WMS identify when using "Feature" format and the layer has named CRS
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Oct 3, 2016
1 parent 29d2bef commit 9ef91ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2977,7 +2977,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 @@ -3072,6 +3072,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 9ef91ea

Please sign in to comment.