[OpenLayers-Users] OpenLayers Select Feature event not registering

Rob Hyx robhyx at gmail.com
Fri Jun 29 05:49:43 PDT 2012


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!

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


More information about the Users mailing list