mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix WMS identify when using "Feature" format and the layer has named CRS
(cherry picked from commit 9ef91ea6294cdab762ffb2543d02473bcccbed80)
This commit is contained in:
parent
79e5911e07
commit
ea2e68b8ae
@ -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 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user