[OpenLayers-Users] Modify features with user specified
coordinates
Yves Moisan
yves.moisan at boreal-is.com
Mon Jan 4 11:41:40 EST 2010
> 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.
Right. I guesss we're not tied to a byte ...
>
> >
> > 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.
Thanx for the pointer Eric. I also need to do it to add a point, that
is enter a coordinate directly instead of putting a point wherever and
then modify it. I'm a bit surprised no one has ever had a customer/user
asking for "how can I put a point at X,Y" yet. Hopefully I can do that
promptly. Thanx again.
Yves
More information about the Users
mailing list