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

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


I have setup a GetFeature control with a WFS protocol which works fine with a
manual mouseclick after the control has been added to the map object and
activated.

    selectControl.events.register("featureselected", this, function (e) {
        vectorLayer.addFeatures([e.feature]);
    });
    selectControl.events.register("featureunselected", this, function (e) {
        vectorLayer.removeFeatures([e.feature]);
    });
    map.addControl(selectControl);
    selectControl.activate();

I want to automatically request the control the same control like so:

    map.controls[5].request(new OpenLayers.Bounds([-11088830, 2200810,
-11088825, 2200815]), { single: true });

This works as well, but only after I have triggered the request at least
once with mouse input. Prior to the manual request the automatic request
will trigger but timeout.

I am fairly new to OpenLayers. Thanks in advance for any input on this.

Dennis



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


More information about the Users mailing list