perliedman/leaflet-routing-machine

Is it possible to get the coordinates of the route without drawing anything on the map ?

MenasriaMohamed opened this issue · 1 comments

Hi there,
I want the route to be rendered and get the coordinates without drawing anything on the map ( without "AddtoMap") ,Is that possible??

You should be able to call the route function on your control and then access the _routes property to get the routes.

Something like this should work

control.route();
const routes = control._routes;
const coordinates = control.getWaypoints();