Closed mona-baharlou closed 6 years ago
Same problem here.
L.tileLayer('https://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png', {
attribution: '<a href="http://openstreetmap.org">OpenStreetMap</a>',
}).addTo(map);
var control = L.Routing.control({
routeWhileDragging: false,
draggableWaypoints: false,
waypointMode: 'snap',
show: true,
addWaypoints: false,
waypoints: waypoints,
lineOptions: {
styles: [{color: 'red', opacity: 0.6, weight: 6}]
}
}).addTo(map);
I expected that the route continues to green route, but it make a turn.
I've tried waypointMode 'snap' and 'smart', but get same result.
The exact route is determined by the routing backend (OSRM by default). So, there must be something in the OpenStreetMap data that makes OSRM choose the other route.
In other words, this is outside the scope of Leaflet Routing Machine, since it just displays the route provided by the backend.
Hi
I added waypoints to the routing machine but it detects a way that i didn't pass. I mean, for example i went from A point to B point from G(street name) street.but it shows C (wrong street)
the code is as below ..How can i solve it?