On Thu, Jan 15, 2009 at 9:46 PM, Zer <[email protected]> wrote:
>
> Hi!
>
> Thanks! That fixed my first probelem!
>
> But the 'onSelect' still doesn't get called, unless I remove the activate
> function. Any ideas?

Do not override the activate method, instead register an "activate" listener:

var ctrl = new OpenLayers.Control.SelectFeature(layer, {
    eventListeners: {
        "activate": function() {
            alert("control activated");
        }
    }
});

or (after the control creation):

ctrl.events.on({
    "activate": function() {
       alert("control activated");
    }
});

Cheers,
--
Eric
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to