[OpenLayers-Users] Regular Polygon
Ian Turton
ijturton at gmail.com
Wed Mar 9 17:29:44 EST 2011
On 9 March 2011 17:01, Vikash Talanki <vikashtalanki at gmail.com> wrote:
> latitude= 17.3157
> longitude=78.5046
> radius=40,number of sides=50
>
> to draw a circle using createRegularPolygon() I am giving
>
>
> var origin={};
> origin.x=78.5046;
> origin.y=17.3157;
> var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(origin, 40,
> 50,90);
> var vlayer = new OpenLayers.Layer.Vector("Editable Vectors");
> map.addLayer(vlayer);
> vlayer.addFeatures(new OpenLayers.Feature.Vector(circle,null,null));
>
> why I am not able to see the circle??????
origin should be a point
try
var origin = new Point(x,y);
Ian
--
Ian Turton
More information about the Users
mailing list