[OpenLayers-Users] Problems when deactivating custom control

2008-05-13 Thread Zer
Hi all, I have made a custom control that gets the length of a line feature. I then show this length in a div. When the control gets deactivated, I want the div to be cleared. What happens is that the div gets cleared but the control does not get deactivated in the panel. Am I missing something

Re: [OpenLayers-Users] Problems when deactivating custom control

2008-05-13 Thread Eric Lemoine
On Tue, May 13, 2008 at 10:15 PM, Zer [EMAIL PROTECTED] wrote: Hi all, Hello I have made a custom control that gets the length of a line feature. I then show this length in a div. When the control gets deactivated, I want the div to be cleared. What happens is that the div gets cleared

Re: [OpenLayers-Users] Problems when deactivating custom control

2008-05-13 Thread Zer
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() {

Re: [OpenLayers-Users] Problems when deactivating custom control

2008-05-13 Thread Eric Lemoine
On Tue, May 13, 2008 at 10:46 PM, Zer [EMAIL PROTECTED] wrote: Eric Lemoine-3 wrote: How about that: mt = new OpenLayers.Control.DrawFeature(vLayer, OpenLayers.Handler.Path, { featureAdded: ShowDistance, handlerOptions: {'freehand': true}, displayClass: