[OpenLayers-Users] How to modify regular polygon

Lehtonen, Mika mika at digikartta.net
Thu Nov 13 17:41:46 EST 2008


I have an application where user draws a circle, (that is a regular 
polygon with 40 sides). That is carried out by 
OpenLayers.Control.DrawFeature using a Handler.RegularPolygon. My task 
would be now to limit the radius of a circle that a user can draw. I 
thought I could do it so that a user can draw a circle beyond the limits 
but the circle is then scaled to maximum limits and a proper warning 
message is shown.

I tried to do that by  'buffer.handler.modifyGeometry({radius: 
'50000'});'  where 'buffer' is the original 'Control'. But it seems not 
to be that easy. Can someone help with this or perhaps had a better idea 
how to carry out this?

- mika -



More information about the Users mailing list