Skip to content

Commit 9ef91ea

Browse files
committedOct 3, 2016
Fix WMS identify when using "Feature" format and the layer has named CRS
1 parent 29d2bef commit 9ef91ea

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
@@ -2977,7 +2977,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
29772977
QString crsType = result.property( "crs" ).property( "type" ).toString();
29782978
QString crsText;
29792979
if ( crsType == "name" )
2980-
crsText = result.property( "crs" ).property( "name" ).toString();
2980+
crsText = result.property( "crs" ).property( "properties" ).property( "name" ).toString();
29812981
else if ( crsType == "EPSG" )
29822982
crsText = QString( "%1:%2" ).arg( crsType, result.property( "crs" ).property( "properties" ).property( "code" ).toString() );
29832983
else
@@ -3072,6 +3072,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
30723072
catch ( const QString &err )
30733073
{
30743074
QgsDebugMsg( QString( "JSON error: %1\nResult: %2" ).arg( err, QString::fromUtf8( mIdentifyResultBodies.value( jsonPart ) ) ) );
3075+
results.insert( results.size(), err ); // string returned for format type "feature" means error
30753076
}
30763077

30773078
delete coordinateTransform;

0 commit comments

Comments
 (0)
Please sign in to comment.