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 here???
mt = new OpenLayers.Control.DrawFeature(vLayer, OpenLayers.Handler.Path, { featureAdded: ShowDistance, handlerOptions: {'freehand': true}, displayClass: 'MeasureTool', deactivate: function() {clearDistance();}, }); If I remove this line "deactivate: function() {clearDistance();" the control gets deactivated in the panel, but how do I then get the div cleard? I also want to clear the div when a new line is drawn. Is there a way to capture an event for this? Thanks and Best Regards, Zer -- View this message in context: http://www.nabble.com/Problems-when-deactivating-custom-control-tp17168613p17168613.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users