[OpenLayers-Trac] [OpenLayers] #3391: TIME parameters Ignored by WMSGetFeatureInfo Control

OpenLayers trac-20090302 at openlayers.org
Wed Jun 29 09:41:41 EDT 2011


#3391: TIME parameters Ignored by WMSGetFeatureInfo Control
---------------------------------------+------------------------------------
 Reporter:  geographika                |       Owner:              
     Type:  feature                    |      Status:  new         
 Priority:  minor                      |   Milestone:  2.12 Release
Component:  Control.WMSGetFeatureInfo  |     Version:  2.10        
 Keywords:  TIME WMSGetFeatureInfo     |       State:              
---------------------------------------+------------------------------------
 When a TIME parameter is applied to a WMS layer it could/should also apply
 to associated WMSGetFeatureInfo requests. Otherwise it can lead to a user
 clicking on an empty map and getting results back when the WMS is not
 within the specified TIME range.

 A workaround is to use the ''beforegetfeatureinfo'' event and to call the
 following function:


 {{{
 function(evt){
         var layers = this.findLayers();
         if (layers.length > 0) {
                 var firstLayer = layers[0];
                 if (firstLayer.params.TIME) {
                         this.vendorParams = {
                                 "time": firstLayer.params.TIME
                         };
                 }
         }
 }
 }}}

 Alternatively the buildWMSOptions function in the
 OpenLayers.Control.WMSGetFeatureInfo could be updated to check for a TIME
 parameter on the first WMS layer and apply this to the request.

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


More information about the Trac mailing list