[OpenLayers-Users] Drawing a circle/callbacks/zoom in scale factors

David Potts dave.potts at pinan.co.uk
Wed Feb 11 07:59:26 EST 2009


Thanks Chris, thats just what I want.

Good point about the projection issue.

Dave.
> On Wed, Feb 11, 2009 at 10:46:03AM -0000, David Potts wrote:
>> Hi List,
>>
>> I known this question been asked before, but how do you draw a circle
>> using a google map background?
>>
>> My first attempt uses a vector feature with a style object, draws the
>> circle looks great.
>
> What is your goal? Something that looks like a circle on a mercator map
> is not actually going to be a 'circle' on the ground, so if that's what
> you're concerned about, then this doesn't make sense.
>
> If this is what you want anyway, then the function you're looking for is:
>
>   http://dev.openlayers.org/apidocs/files/OpenLayers/Geometry/Polygon-js.html#OpenLayers.Geometry.Polygon.createRegularPolygon
>
>   http://openlayers.org/dev/examples/regular-polygons.html
>
> the latter is demonstrating using the REgularPolygon drawing control,
> but that uses the createRegularPolygon method internally.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>


-- 
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of the
Pinan Software





More information about the Users mailing list