Skip to content

Commit ea2e68b

Browse files
committedOct 28, 2016
Fix WMS identify when using "Feature" format and the layer has named CRS
(cherry picked from commit 9ef91ea)
1 parent 79e5911 commit ea2e68b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2983,7 +2983,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
29832983
QString crsType = result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "type" ) ).toString();
29842984
QString crsText;
29852985
if ( crsType == QLatin1String( "name" ) )
2986-
crsText = result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "name" ) ).toString();
2986+
crsText = result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "properties" ) ).property( QStringLiteral( "name" ) ).toString();
29872987
else if ( crsType == QLatin1String( "EPSG" ) )
29882988
crsText = QStringLiteral( "%1:%2" ).arg( crsType, result.property( QStringLiteral( "crs" ) ).property( QStringLiteral( "properties" ) ).property( QStringLiteral( "code" ) ).toString() );
29892989
else
@@ -3080,6 +3080,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
30803080
catch ( const QString &err )
30813081
{
30823082
QgsDebugMsg( QString( "JSON error: %1\nResult: %2" ).arg( err, QString::fromUtf8( mIdentifyResultBodies.value( jsonPart ) ) ) );
3083+
results.insert( results.size(), err ); // string returned for format type "feature" means error
30833084
}
30843085

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

0 commit comments

Comments
 (0)
Please sign in to comment.