Skip to content

Commit

Permalink
Merge pull request #5303 from pblottiere/server_bugfix_ogc_queryable_…
Browse files Browse the repository at this point in the history
…layer

[server][bugfix] Fix OGC test getfeatureinfo:each-queryable-layer
  • Loading branch information
pblottiere authored Oct 17, 2017
2 parents b77c11f + a3971ee commit 4901f0a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/server/services/wms/qgswmsgetcapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,6 @@ namespace QgsWms
const QgsLayerTree *projectLayerTreeRoot = project->layerTreeRoot();

QDomElement layerParentElem = doc.createElement( QStringLiteral( "Layer" ) );
layerParentElem.setAttribute( QStringLiteral( "queryable" ), QStringLiteral( "1" ) );

// Root Layer name
QDomElement layerParentNameElem = doc.createElement( QStringLiteral( "Name" ) );
Expand Down
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswmsrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,8 @@ namespace QgsWms
QStringList queryLayers = mWmsParameters.queryLayersNickname();
if ( queryLayers.isEmpty() )
{
throw QgsBadRequestException( QStringLiteral( "ParameterMissing" ),
QStringLiteral( "QUERY_LAYERS parameter is required for GetFeatureInfo" ) );
QString msg = QObject::tr( "QUERY_LAYERS parameter is required for GetFeatureInfo" );
throw QgsBadRequestException( QStringLiteral( "LayerNotQueryable" ), msg );
}

// The I/J parameters are Mandatory if they are not replaced by X/Y or FILTER or FILTER_GEOM
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/qgis_server/getcapabilities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Content-Type: text/xml; charset=utf-8
<Exception>
<Format>XML</Format>
</Exception>
<Layer queryable="1">
<Layer>
<Name>QGIS Test Project</Name>
<Title>QGIS Test Project</Title>
<CRS>CRS:84</CRS>
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/qgis_server/getcapabilities_inspire.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Content-Type: text/xml; charset=utf-8
<inspire_common:Language>ita</inspire_common:Language>
</inspire_common:ResponseLanguage>
</inspire_vs:ExtendedCapabilities>
<Layer queryable="1">
<Layer>
<Name>QGIS Test Project</Name>
<Title>QGIS Test Project</Title>
<CRS>CRS:84</CRS>
Expand Down

0 comments on commit 4901f0a

Please sign in to comment.