Skip to content
Permalink
Browse files

Merge pull request #5425 from pblottiere/server_getfeatureinfo

[server][bugfix] Consider QUERY_LAYERS as valid layers in GetFeatureInfo
  • Loading branch information
pblottiere committed Oct 27, 2017
2 parents c9ca175 + 98c05ad commit dfaabdcf6e91f80543d29690dcd9decebcc543e6
Showing with 18 additions and 0 deletions.
  1. +10 −0 src/server/services/wms/qgswmsrenderer.cpp
  2. +8 −0 tests/src/python/test_qgsserver_wms.py
@@ -956,6 +956,16 @@ namespace QgsWms
else
layers = stylizedLayers( params );

// add QUERY_LAYERS to list of available layers for more flexibility
for ( const QString &queryLayer : queryLayers )
{
if ( mNicknameLayers.contains( queryLayer )
&& !layers.contains( mNicknameLayers[queryLayer] ) )
{
layers.append( mNicknameLayers[queryLayer] );
}
}

// create the mapSettings and the output image
QgsMapSettings mapSettings;
std::unique_ptr<QImage> outputImage( createImage() );
@@ -84,6 +84,14 @@ def test_getfeatureinfo(self):
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo-text-xml')

self.wms_request_compare('GetFeatureInfo',
'&layers=&styles=&' +
'info_format=text%2Fxml&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo-text-xml')

# Test getfeatureinfo response html
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +

0 comments on commit dfaabdc

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