[OpenLayers-Users] OpenLayers Select Feature event not registering

Rob Hyx robhyx at gmail.com
Fri Jun 29 09:21:37 PDT 2012


Okay so that fixed the issue of the event not being captured, but when
I toggle the control.activate / deactivate on and off the layer
toggles visibility as well. This was not the case in 2.11. Does that
make sense, and is there another way to allow me to switch between
select feature and navigation?

On Fri, Jun 29, 2012 at 10:38 AM, Rob Hyx <robhyx at gmail.com> wrote:
> Yeah, that's what it is. I'm using 2.11 and those events are in 2.12.
> Thanks, I'll try upgrading and hope it doesn't break anything :)
>
> On Fri, Jun 29, 2012 at 10:01 AM, Slawomir Messner
> <slawomir.messner at staff.uni-marburg.de> wrote:
>> Hi,
>> but box selection works? Do you have the newest OL version? The events are
>> pretty new.
>> Regards
>> Slawomir
>>
>> Am 29.06.2012 14:49, schrieb Rob Hyx:
>>
>>> Hi all, I am having trouble trying to get an event to register with my
>>> SelectFeature object. I am trying to catch the 'boxselectionend' (or
>>> start) and it just won't fire. Here is my code:
>>>
>>> selectControl = new OpenLayers.Control.SelectFeature( vectorLayer, {
>>> box: true, onSelect:function(feature) { ...// This code works fine...
>>> } } );
>>> selectControl.events.on( { 'boxselectionstart':function(evt) {
>>> alert('Works!'); } } );
>>> map.addControl(selectControl);
>>>
>>> It says in the API that this event is supported:
>>>
>>> http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.events
>>>
>>> Thanks in advance for any and all help!
>>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
> --
> HYX
> http://hyx-music.com



-- 
HYX
http://hyx-music.com


More information about the Users mailing list