I'm building a small site with a map. I need a routing by foot so i considered switching from the osrmv1 test server to MapBox for my test because osrm test server only provide driving.
i try to change the Routing as so:
const options = { profile: 'mapbox/walking' };
const mapRouter = L.Routing.control({
router: L.Routing.Mapbox( mapBoxAPIKey, options),
waypoints: [
L.latLng([this.currentLatlong[0], this.currentLatlong[1]]),
L.latLng([this.pointToGoLatlong[0], this.pointToGoLatlong[1]])
],
fitSelectedRoutes : false,
routeWhileDragging: false,
collapsible: true,
lineOptions: {
styles: [{
color: 'green',
opacity: 1,
weight: 3
}]
},
});
mapRouter.addTo(this.map);
but the line :
router: L.Routing.Mapbox( mapBoxKey, options)
don't recognize the parameter Mapbox for L.Routing
what am i missing ?
thanks