Skip to content
Permalink
Browse files

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 79e5911 commit ea2e68b8ae454d461530f8afcbe6cb2740d3033d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/wms/qgswmsprovider.cpp
@@ -2983,7 +2983,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
QString crsType = result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "type" ) ).toString();
QString crsText;
if ( crsType == QLatin1String( "name" ) )
crsText = result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "name" ) ).toString();
crsText = result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "properties" ) ).property( QStringLiteral( "name" ) ).toString();
else if ( crsType == QLatin1String( "EPSG" ) )
crsText = QStringLiteral( "%1:%2" ).arg( crsType, result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "properties" ) ).property( QStringLiteral( "code" ) ).toString() );
else
@@ -3080,6 +3080,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
}

results.insert( results.size(), qVariantFromValue( featureStoreList ) );

0 comments on commit ea2e68b

Please sign in to comment.
You can’t perform that action at this time.