Hi,
My client requires to see the length of a straight line while it's drawing. I'm using SetDrawMode('Line') to draw a line but I can't figure out a way to find the length while mouse moves.
Thanks,
Tracy
Hi,
My client requires to see the length of a straight line while it's drawing. I'm using SetDrawMode('Line') to draw a line but I can't figure out a way to find the length while mouse moves.
Thanks,
Tracy
Tracy,
Sorry, we do not support this feature currently; but maybe you can use Measure Control of OpenLayers directly instead; please see the attached sample for detail.
The difference in my demo is that it calculates the length of the drawing line in map click event. Getting the length while mouse moves may cause performance problem at client side you know. .
Please refer to dev.openlayers.org/releases/...re-js.html for detail of OpenLayers.Control.Measure control.
Thanks,
Howard
1240-Post_6336.zip (7.31 KB)