[OpenLayers-Users] Activate and deactivate event on control problem

Marc Jansen jansen at terrestris.de
Sat Oct 10 03:43:55 EDT 2009


Hi Jimmy,

the approach you use is correct, simply try it out on
http://openlayers.org/dev/examples/draw-feature.html
using firebugs console:

map.controls[6].events.register("activate", null, 
function(){alert("activate!");});
// map.controls[6] is the draw Point control

Afterwards, activate the draw point control and you should see the alert.

So without further code this could be hard to debug,

Regards,
Marc





Jimmy Aumard schrieb:
> Hi,
>
> I try to register activate and deactivate event on a control but it's 
> doesn't work :
>
> polygonControl = new 
> OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.RegularPolygon,{handlerOptions:polyOptions});
>
> polygonControl.events.register("activate", polygonControl, 
> function(){alert("activate!");});
>
> I have no alert.
>
> Thanks for help.
>
> Jim
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   




More information about the Users mailing list