[OpenLayers-Users] about eventListeners

Eric Lemoine eric.c2c at gmail.com
Fri Nov 7 03:04:29 EST 2008


Hi.

Currently the draw feature and modify feature controls do not support
that - you cannot register listeners called while features are
drawn/modified.

I think we could imagine adding featurebeingdrawn featurebeingmodified
events in Layer.Vector, Control.DrawFeature and Control.ModifyFeature;
but, to my knowledge, this is no work being done or planned on that.

Eric

2008/11/6, Lehtonen, Mika <mika at digikartta.net>:
> Hi again,
>
> I just haven't even yet been able to understand all the event handling,
> listening, registering and so on. I have this pair of draw and modify
> controls in my code in order to draw a "circle" and afterwards modify
> it. It works fine. What I haven't been figuring out is that how can I
> build a function here what would both show the radius of the circle
> while drawing/modifying it and would restrict it, in other words would
> put some extent or limit to it. Any hints?
>
> thanks,
> - mika -
>
>             var circle = new OpenLayers.Control.DrawFeature(vlayer,
>
> OpenLayers.Handler.RegularPolygon,
>                                             {handlerOptions: {sides: 40} });
>
>             map.addControl(circle);
>
>           mod = new OpenLayers.Control.ModifyFeature(vlayer);
>        mod.mode |= OpenLayers.Control.ModifyFeature.DRAG
>        mod.mode |= OpenLayers.Control.ModifyFeature.RESIZE
>        mod.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE
>           map.addControl(mod);
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list