Hi Luca, no this is not possible currently, please file an enhancement ticket (patches welcome ofcourse).
A workaround you can try is something like (untested pseudo code): var findLayers = control.findLayers; control.events.on({ beforegetfeatureinfo: function(evt) { if // do your zoom level check here { control.findLayers = function() { return []; }; } else { control.findLayers = findLayers; } } }); Best regards, Bart -- Bart van den Eijnden OSGIS - http://osgis.nl On Nov 9, 2011, at 2:26 PM, Luca Casagrande wrote: > Hello folks, > Is it possible to disable the getfeatureinfo event of > OpenLayers.Control.WMSGetFeatureInfo with a check made on the > beforegetfeatureinfo event? > I need to check the zoom level and, if not in range, don't send the request > to the server. > > Thanks for the help > Luca > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Beforegetfeatureinfo-and-getfeatureinfo-tp6977952p6977952.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > us...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users >
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users