[OpenLayers-Users] Edit a "freehand polygon"

Stephen Woodbridge woodbri at swoodbridge.com
Tue Feb 12 11:26:28 EST 2008


Tim Schaub wrote:
> Hey-
> 
> Swärd Mårten wrote:
>> Hello!
>>
>> I need some functionality that makes it possible to edit the points in a 
>> freehand drawn polygon. I know that it’s tecnicaly possible to do this 
>> but in real life the edit function, as I know it, is very time 
>> counsuming to use due to the many points that has to be modified. The 
>> two questions that I have are as follows:
>>
>> A) Is it possible to change the edit function so that when you edit one 
>> point the naigbor points follows.. And so to say smoothen the curve of 
>> the edited point relative to the rest of the points..
>>
>> B) If the answer is a big NO on A. =) Is it possible to reduce the 
>> number of points that is drawn when using the freehand mode?
> 
> This would be an easy modification.  The draw feature control could take 
> a tolerance property in the handlerOptions and addPoint would only get 
> called in freehand mode when the tolerance was met.
> 
>> B II) Or is it possible to reduce the number of points on a polygon 
>> after you have drawn it?
> 
> This would require a simplify (Douglas Peucker style) method for 
> geometries.  If there is interest in building a library of more advanced 
> geometry operations client-side, it might do well as a compliment to 
> OpenLayers (not in OL itself).  I'm interested in this.

Tim,

I would also be interested in being able to use feature create and 
editing functionality with OpenLayers. It seems to me that there have 
been other requests for help and support in this area, so there might be 
a lot of user interest. It seems like a natural extension of the 
OpenLayers functionality.

-Steve



More information about the Users mailing list