[OpenLayers-Users] drawing a circle in openlayers

Ralph Dell RDell at CatawbaCountyNC.gov
Thu Aug 26 08:01:26 EDT 2010


Have you tried the polygon control?

// set up the polygon control, for drawing a circle
  polyOptions = {sides: 40};
  polygonControl = new OpenLayers.Control.DrawFeature(circleLayer,
		OpenLayers.Handler.RegularPolygon,
		{handlerOptions: polyOptions});
	map.addControl(polygonControl);

..

polygonControl.handler.setOptions({radius: radiusx});
polygonControl.handler.activate();

Ralph Dell

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of Imran Rajjad
Sent: Thursday, August 26, 2010 7:32 AM
To: <users at openlayers.org>
Subject: [OpenLayers-Users] drawing a circle in openlayers

Hi list,

I`m trying to draw a circle geometry with a radius of 30m, currently
I`m calculating lat/long of each vertex from the centre , i was hoping
if this could be done through openlayers

regards,
Imran

-- 
I.R
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users



More information about the Users mailing list