[OpenLayers-Users] Problems with selectControl after upgrading from OL 2.6 to 2.7

Zer zer_matt at hotmail.com
Fri Jan 16 12:44:19 EST 2009


Thanks Eric!

The last alternative worked!


-Z



Eric Lemoine wrote:
> 
> On Thu, Jan 15, 2009 at 9:46 PM, Zer <zer_matt at hotmail.com> 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
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Problems-with-OpenLayers.Control.SelectFeature-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2169612.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list