-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add posibility to append new point to existing line #291
Comments
Thank you. I know this feature and use it extensively however I find it more "natural" to append new points to the end of the line. Currently I have to drag a point near where I want my polyline to end and then create the nessecary points in between. The main problem I see here is that one can edit all existing features at once while in "edit" mode and thus it's hard to tell at which polyline the user want's to add new endpoints. Maybe Ctrl+Drag of a point could "extrude" a new point out of it (if it's an end-point)? Please tell me what you think? |
You can programatically ensure that there is only one feature (layer) available in the edit layer group, and then invoke the edit functionality. This ensures that there is no confusion about what is being edited... I don't know whether a ctrl+drag operation would interfere with anything else, but certainly the idea of holding an endpoint fixed whilst extending the line onwards (or in another direction) has its merits. I'd +1 on that as an enhancement (probably endpoints only else if it were possible on other nodes, it would become a multiLinestring). Identifying and editing individual features is not an issue though.... |
While drawing some tourist routes in the Mapbox editor for my friends, just discovered that I'd love to see this too. :) E.g. someone draws a route, then accidentally triggers draw end — how would he go back to drawing the line? I'd expect maybe enabling the draw mode again if you click on the last point, or at least have it as an option. @jacobtoye thoughts? |
This is something I really need in a collaborative mapping tool I'm creating. The only way I can see to get the functionality I want is to have the users create a start and end point and then drag out the nodes in between. That really isn't very intuitive and users would expect to be able to continue drawing at the end of the path. |
+1 In fact, I think it's too easy to delete a node by just clicking on it. Maybe a Ctrl+Click or so would be more intuitive? |
What about using a keyboard shortcut "e" to extrude the currently selected point (would only work for start and end points) |
Has this been implemented by chance? Or did anyone manage to find a simple solution to simulate this? I really need this feature and the only thing I could think of to achieve it was something complicated like:
The OpenStreetMap ID editor (for example) has a very nice feature to append points to existing line, click a "PLUS" button there and continue the line. I would like some functionality similar to that. |
You can use the addLatLng() method -- http://leafletjs.com/reference-1.0.3.html#polyline |
mdomnita - if #651 was merged in, you could just capture map.on(L.Draw.Event.EDITHOOK to get the editHandler. Unfortunately, it looks like the maintainers of L.Draw have lost interest in this project. However, feel free to merge it for yourself. (note: if you're interested, please let me know because there's a few small bugfixes for that code that I've developed in the last 5 months that I've never pushed in) |
I've posted a spinoff feature request at iD editor repo related to this: openstreetmap/iD#5426 |
@mdomnita man, you should really work on your github formatting skills. |
I'm sorry that my comment from 2017 bothered you two years after anyone touched this project. I hoped that my hack might help someone get this issue solved and did not have time for a PR then. Apparently, it didn't... so I deleted it now and it will not bother anyone in the future. Thanks. |
It should be possible to append new points to an already existing line.
The text was updated successfully, but these errors were encountered: