chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
22 stars 13 forks source link

Path: waypoint insertion should not try to find best location on path #840

Open tahini opened 8 months ago

tahini commented 8 months ago

The Path class's insertWaypoint function should just take the insert location, or add the waypoint at the end of the path.

Currently, it uses turfLineSlice to insert along the current path the waypoint at the location closest to the line, but it is not possible de define how close it should be. If we need that detection, and we do need it to add it along the path when it is clicked on the map while editing, this functionality should be moved out of the insertWaypoint method and use a utility function instead.