I need to override the mousedown, mousemove, and mouseup events clientside when drawing a circle on the map. In essense, what I want to do is display the radius of the cicle as the user draws the circle. On the mousedown event, I want to attach a tooltip to the mouse cursor position. This I can easily do with a jquery plugin called QTips2. I want to update the text in the tooltip with the radius as the radius increases/decreases, and finally, want the tooltip to disappear on the mouseup event.
I looked at adding the OpenLayers Control "measure", but it relies on the click event.
But there is something wrong with OpenLayers, some events(like sketchstarted or mousedown) won’t be raised. We are working on it and it needs some time. We’ll let you know once we resolved it.
I figured it out myself. I simply overrode OpenLayers.Handler.RegularPolygon in the OnMapCreated event on my page.
It handles the down, move and up events. To that I added a simple OpenLayers.Popup to show the radius of the circle. This popup is centered at the circle center point.
The popup is made visible on the down event. The radius is updated on the move event, and the popup is hidden again on the up event - quite simple and effective.
Thanks for looking into this though. I am sure that a lot of your customers would like this functionality.