[OpenLayers-Users] Automatic GetFeature.request only triggers after manual request

DBauszus dbauszus at gmail.com
Wed Feb 19 16:41:29 PST 2014


I found the issue myself. I am not sure whether this is a bug in the
OpenLayers script.

The modifiers property of the GetFeature control is null when I request the
control like this:

.request(new OpenLayers.Bounds([lonLat.lon, lonLat.lat, lonLat.lon,
lonLat.lat]), { single: true });

and not by clicking into the map object.

Once I called the control by clicking in the map the modifiers property is
set to {multiple:null,toggle:null}.

If I declare the modifiers property on the control like this:

.modifiers = {multiple:null,toggle:null}

I can run the .request without clicking in the map.

Is this an oversight by me? The OL documentation does not state that the
modifiers should be declared manually. However, no default values are given
in the documentation page.

Dennis



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Automatic-GetFeature-request-only-triggers-after-manual-request-tp5104763p5104816.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list