Skip to content
Permalink
Browse files

Fix OGC test getfeatureinfo:invalid-query_layers

  • Loading branch information
pblottiere committed Sep 29, 2017
1 parent e06ec71 commit 54137b751c1499c37ef16019570073384f8fcdec
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/server/services/wms/qgswmsrenderer.cpp
@@ -1255,10 +1255,13 @@ namespace QgsWms

Q_FOREACH ( QString queryLayer, queryLayers )
{
bool validLayer = false;
Q_FOREACH ( QgsMapLayer *layer, layers )
{
if ( queryLayer == layerNickname( *layer ) )
{
validLayer = true;

QDomElement layerElement;
if ( infoFormat == QgsWmsParameters::Format::GML )
{
@@ -1316,6 +1319,12 @@ namespace QgsWms
break;
}
}

if ( !validLayer )
{
throw QgsBadRequestException( QStringLiteral( "LayerNotDefined" ),
QStringLiteral( "Layer '%1' not found" ).arg( queryLayer ) );
}
}

if ( featuresRect )

0 comments on commit 54137b7

Please sign in to comment.
You can’t perform that action at this time.