[OpenLayers-Users] SelectControl doesn't work for me with IE8

sl.tricon simon.linimair at tricon-rfid.com
Mon Oct 17 12:18:48 EDT 2011


I'm trying to display an alert message when a user clicks on one of the
vectors is in the vector layer. This works fine in all browser, except IE8.

    map = new OpenLayers.Map(id, {
        theme: null
    });

    vectorLayer = new OpenLayers.Layer.Vector("Vector Layer");

    map.addLayer(vectorLayer);
    selectControl = new OpenLayers.Control.SelectFeature(vectorLayer);

    vectorLayer.events.on({
        'featureselected': onPopupFeatureSelect,
        'featureunselected': onPopupFeatureUnselect
    });

    map.addControl(selectControl);
    selectControl.activate();

    // ...

    function onPopupFeatureSelect(feature) {
        alert("OK");
    } // <-- Exceptions are thrown here

Whenever the onPopupFeatureSelect function is finished (at {) the IE8
debugger somehow falls into the JQuery code and throws exceptions there.

Am I using the select feature correctly?


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SelectControl-doesn-t-work-for-me-with-IE8-tp6901223p6901223.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list