[OpenLayers-Users] circle (again)...
Marc Jansen
jansen at terrestris.de
Fri Oct 2 05:29:10 EDT 2009
Hi Diorama,
Are you passing in an OpenLayers.Geometry.Point-Instance as first
parameter to OpenLayers.Geometry.Polygon.createRegularPolygon()?
see:
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Geometry/Polygon-js.html#OpenLayers.Geometry.Polygon.createRegularPolygon
Your code hints that you are passing a LonLat-Object.
Regards,
Marc
Diorama Yuanito schrieb:
> Hello everybody !
> How are u today ?
>
> I just want to ask something, maybe someone can help me...
>
> i write js like these
>
> var circlestyle =
> OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {});
> var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(lonlat,
> myrad, 40);
> var uaLayer = new OpenLayers.Layer.Vector("Circle Layer");
> uaLayer.addFeatures(new OpenLayers.Feature.Vector(circle));
> uaLayer.drawFeature(circle, circlestyle);
> map.addLayers([uaLayer]);
>
> in Firebug, everythings seem OK, no Error...
> but i couldn't see my circle?
>
> Why?
>
> Thx
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list