[OpenLayers-Users] Problems when deactivating custom control

Zer hcan at hotmail.com
Tue May 13 16:46:00 EDT 2008




Eric Lemoine-3 wrote:
> 
> 
> How about that:
> 
> mt = new OpenLayers.Control.DrawFeature(vLayer, OpenLayers.Handler.Path, {
>     featureAdded: ShowDistance,
>     handlerOptions: {'freehand': true},
>     displayClass: 'MeasureTool'
> });
> mt.events.on({
>     'deactivate': function() {
>         clearDistance();
>     }
> });
> 
> Cheers,
> --
> Eric
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

Thanks Eric! Works perfectly!

Is there a way to capture the events when a new line is drawn? Are there any
events when the users moves the mouse to draw the line? What I am looking
for is a way to clear the text that shows the distance when the users starts
to measure a new distance. I would also like to constantly update the
distance text, while the user moves the mouse in order to draw the line. 

Thanks,

-Z
-- 
View this message in context: http://www.nabble.com/Problems-when-deactivating-custom-control-tp17168613p17217990.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list