im trying to creating polyline between points in leaflet.
Im trying use Routing but it work only for roads.
Did you have any ideas what i can try next?
Im trying to use Routing, but only works on roads
var polyline = L.polyline(latlngs, {color: 'red'});
map.fitBounds(polyline.getBounds());
L.Routing.control({
waypoints: latlngs,
}).addTo(map);
New contributor
Piotr Wiśniewski is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.