[OpenLayers-Users] Circles

Christopher Schmidt crschmidt at metacarta.com
Mon Dec 8 14:07:48 EST 2008


On Mon, Dec 08, 2008 at 01:45:55PM -0500, Heidt, Christopher M. wrote:
> this is definitly a clever aproach, but it is still a work-around for what i consider to be a basic shape.
> I just wonder why i cant have something along the lines of: new Openlayers.Geometry.Circle(lon,lat,radius);

Adding a new Geometry type is about more than just creating the
geometry. What should happen when the GML writer encounters a circle?
How does a renderer which doesn't have circle types as built ins handle
it? etc. etc.

Adding a new Geometry type probably ends up affecting more than a dozen
different classes in OpenLayers in ways that are ill defined. Sure, we
culd make it easier to draw a circle -- but the REgularPolygon ends up
having the same result, with not a very different API than you're
proposing, and has the benefit that it works with all the existing
functionality built around the Simple Features specifications that
OpenLayers vector support is based on.

Is it unfortunate that circles are not a 'default' geometry type in more
specifications? Maybe. But I don't understand why the RegularPolygon --
which creates a visual circle, but has the benefit of being usable in
software other than OpenLayers -- is such a problem.

Help me understand?

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list