[OpenLayers-Users] Display Radius When Creating Circle with DrawFeature
Donald Kerr
donald.kerr at dkerr.co.uk
Wed Jan 16 14:24:52 PST 2013
Any takers? Help greatly appreciated.
From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Donald Kerr
Sent: 15 January 2013 08:14
To: openlayers-users at lists.osgeo.org
Subject: [OpenLayers-Users] Display Radius When Creating Circle with
DrawFeature
Using the following code,
myLayer = new OpenLayers.Layer.Vector("My Layer");
myCtrlCirc = new OpenLayers.Control.DrawFeature(
myLayer,
OpenLayers.Handler.RegularPolygon,
{handlerOptions: {sides: 40}}
);
I am creating a circle (40 sided polygon) by mousing down on the map,
dragging the mousing up. After mouseup, the polygon is added to the layer as
a vector feature. This allows me to see the size of the circle as I am
drawing it.
Is there a way to display the radius of the circle in a div as it is being
created? "sketchmodified" does not seem to get fired and I cannot think of a
way to get this to work.
Help greatly appreciated. Many thanks.
Regards,
Donald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130116/ab2c7db8/attachment.html>
More information about the Users
mailing list