Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
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.
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.