[OpenLayers-Trac] [OpenLayers] #3253: Reverse QUERY_LAYERS order in GetFeatureInfo requests

OpenLayers trac-20090302 at openlayers.org
Fri Apr 8 15:22:49 EDT 2011


#3253: Reverse QUERY_LAYERS order in GetFeatureInfo requests
---------------------------------------+------------------------------------
 Reporter:  marcjansen                 |       Owner:              
     Type:  feature                    |      Status:  new         
 Priority:  minor                      |   Milestone:  2.12 Release
Component:  Control.WMSGetFeatureInfo  |     Version:  2.10        
 Keywords:                             |       State:  Review      
---------------------------------------+------------------------------------
 See this thread on the developers mailing list: http://osgeo-
 org.1803224.n2.nabble.com/layer-order-in-findLayers-of-WMSGetFeatureInfo-
 and-WMTSGetFeatureInfo-controls-td6252895.html

 When we issue a !GetFeatureInfo request through the
 !OpenLayers.Control.!GetFeatureInfo, we merge possible layers to the same
 service in the order they are returned from the candidates array.

 Some WMS servers return the !GetFeatureInfo-response ordered in the same
 way the QUERY_LAYERS were given in the original request.

 If we reverse the order in which we merge the layers, the output of a
 !GetFeatureInfo request seems more natural.

 You can experience the (slightly unexpected) behaviour in the
 getfeatureinfo-popup.html example: if you click on a water body, you'll
 currently end up with the response for the water body layer drawn below
 the state layer.

 The attached patch proposes to inverse the order of layers when we issue
 the !GetFeatureInfo-request.

 The inversion of layers is in accordance to the behaviour the
 WMTSGetFeatureInfo-control shows.

 The tests for Control.WMSGetFeatureInfo needed to be adjusted to the new
 logic to still pass (With this patch applied they pass in FF4).

 Thanks for any review or comment.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3253>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list