[OpenLayers-Dev] ModifyFeature for Geometry.Rectangle and others

Tim Schaub tschaub at openplans.org
Thu Nov 15 18:39:49 EST 2007


Eric Lemoine wrote:
> On Nov 15, 2007 5:51 PM, Tim Schaub wrote:
>>
>> I'm very much in favor of adding properties to a polygon like "regular"
>> (boolean) and "sides" (integer).
>>
>> This way, controls could (optionally) respect these properties of a
>> polygon - allowing for editing that would maintain the geometry "class."
>>
> 
> Thanks for your response Tim.
> 
> I think we agree on the way to proceed. I really like the addition of
> "regular" and "sides" to cover every case.
> 
> I've started working on an implementation of all this, starting from
> your irregular regular polygons work
> (<http://trac.openlayers.org/ticket/1098>) and pvalsecc's
> ModifyFeature patch. The idea is to be able to modify regular polygons
> and polygons with fixed number of sides without removing these
> constrains.
> 
> My code doesn't work for polygons with fixed number of sides yet.
> 
> See <http://dev.openlayers.org/sandbox/elemoine/regular-polygon/examples/modify-feature.html>.
> 
> Note that I added an APIProperty to ModifyFeature to make it respect
> constrains (if any). So the old behavior can still be achieved.
> 

Nice work!  Thanks for the patch review as well.  Irregular polygon 
drawing is now in the trunk.  I've scheduled some time to review patches 
tomorrow, so I'll try to catch up with the other work you guys have been 
doing.

Tim

> --
> Eric
> 
> !DSPAM:4033,473cce80279711637810514!
> 




More information about the Dev mailing list