[OpenLayers-Users] Modify features with user specified coordinates

Eric Lemoine eric.lemoine at camptocamp.com
Sun Dec 27 08:03:19 EST 2009


On Monday, December 21, 2009, Yves Moisan <yves.moisan at boreal-is.com> wrote:
> Hi All,

Hi Yves

> I was asked to provide users with text boxes so that they can enter
> coordinates they want a vertex or point moved to in RESHAPE mode.  I
> thought of a "MANUAL_RESHAPE" option, but looking at ModifyFeature.js
> shows that all values on the byte are taken :
>
> OpenLayers.Control.ModifyFeature.RESHAPE = 1 (RESIZE = 2, ROTATE = 4 and
> DRAG = 8) plus all combinations of mode.

You could use 16, as long as it's a power of 2.

>
> Has anyone implemented such a functionality in OL ?  I could modify the
> behaviour of RESHAPE so that it pops text boxes upon clicking on a point
> or vertex, but I would rather have it as another editing option mode.
> Ideally, people would be allowed to toggle "default" RESHAPE (that is
> drag points or vertices with the mouse) and manual reshape.  Ideas ?


If I had to do that I'd try to manually call the modify feature
control's dragStart, dragVertex and dragComplete methods.

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list