perliedman / leaflet-routing-machine

Control for routing in Leaflet
https://www.liedman.net/leaflet-routing-machine/
Other
1.08k stars 350 forks source link

documentation on IRoute interface incorrect #601

Closed noerw closed 2 years ago

noerw commented 4 years ago

The docs say that a custom route should have the field waypoints. This is not correct, my router implementation only worked once i created routes with the following fields instead:

inputWaypoints,   // waypoints passed to route()
actualWaypoints,  // corresponding waypoints returned by the router
waypointIndices,  // indices of the waypoints in `coordinates[]`
noerw commented 4 years ago

related: #545

curtisy1 commented 2 years ago

Nice catch! The properties were indeed undocumented before. I revamped the docs a bit for the upcoming v4 so this is now corrected. One thing to look out for however: The actualWaypoints will only be called waypoints in the next version