Skip to content

Commit f365206

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 80e820f commit f365206

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
@@ -2677,7 +2677,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
26772677
QString crsType = result.property( "crs" ).property( "type" ).toString();
26782678
QString crsText;
26792679
if ( crsType == "name" )
2680-
crsText = result.property( "crs" ).property( "name" ).toString();
2680+
crsText = result.property( "crs" ).property( "properties" ).property( "name" ).toString();
26812681
else if ( crsType == "EPSG" )
26822682
crsText = QString( "%1:%2" ).arg( crsType, result.property( "crs" ).property( "properties" ).property( "code" ).toString() );
26832683
else
@@ -2773,6 +2773,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
27732773
catch ( const QString &err )
27742774
{
27752775
QgsDebugMsg( QString( "JSON error: %1\nResult: %2" ).arg( err, QString::fromUtf8( mIdentifyResultBodies.value( jsonPart ) ) ) );
2776+
results.insert( results.size(), err ); // string returned for format type "feature" means error
27762777
}
27772778

27782779
delete coordinateTransform;

0 commit comments

Comments
 (0)
Please sign in to comment.