[OpenLayers-Users] Create a Circle from a Point
Pierre GIRAUD
bluecarto at gmail.com
Tue Oct 7 03:34:11 EDT 2008
Hi Lyciano,
I think you're lucky.
Recently I had to something similar myself.
Attached you'll find an example page with a specific control I developed.
This control lets you draw a circle (in fact a regularPolygon) given
its center and its radius.
This is not complete for your use case because the radius is given in
the geographical units. You'll want to convert it from km to DD before
you call updateCircle.
Hope this helps,
Pierre
ps: I'm about to write a "tutorial" page on the OpenLayers wiki to
help people write such a control. Don't hesitate to tell me if my code
is clear enough.
On Mon, Oct 6, 2008 at 8:12 PM, Luciano - Uol <l.s.borges at uol.com.br> wrote:
> Hi All,
>
> How can I create a circle after give to the OL the POINT [ex:
> POINT(-42.77844296875 -12.231795312500001)] and the radius in Km?
>
> PS: I'm using the unit 'DD' in map file.
>
> Sds, Luciano.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Circle.js
Type: application/x-javascript
Size: 6335 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081007/e5d812ef/Circle.js
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081007/e5d812ef/circle.html
More information about the Users
mailing list