dabreegster / route_snapper

Draw routes in MapLibre snapped to a street network using client-side routing
https://dabreegster.github.io/route_snapper
Apache License 2.0
147 stars 9 forks source link

Don't make a freehand line when two points aren't connected #55

Open dabreegster opened 7 months ago

dabreegster commented 7 months ago

Currently when snapping, if two waypoints are disconnected in the graph, the result is a straight line between them, and the snapped property is incorrect. At minimum, this property should be set correctly. But more ideally, there should just be no result, or a clear way to indicate failure. This should be configurable, because in the ATIP sketch use case where freehand and snapped points can be mixed, a straight line is appropriate.