I am trying to work with the Mapbox Directions plugin. I have found no documentation for the various controls indicated in the example here:
https://www.mapbox.com/mapbox.js/example/v1.0.0/mapbox-directions/
The Inputs control doesn't work well at all so I'm using my own control and have got it to display the origin and destination markers, route highlight, and instructions using code similar to this:
var loStartLatLng = L.latLng(53.5, -113.5);
var loEndLatLng = L.latLng(53.5012, -113.5012);
var loDirections = L.mapbox.directions({
profile: 'mapbox.driving'
});
loDirections.setOrigin(loStartLatLng);
loDirections.setDestination(loEndLatLng);
loDirections.query();
var loDirectionsLayer = L.mapbox.directions.layer(loDirections).addTo(moMap);
var loDirectionsErrorsControl = L.mapbox.directions.errorsControl('divRouteErrors', loDirections);
var loDirectionsRoutesControl = L.mapbox.directions.routesControl('divAlternateRoutes', loDirections);
var loDirectionsInstructionsControl = L.mapbox.directions.instructionsControl('divRouteInstructions', loDirections);
I have not found documentation for any of the above controls. One thing I absolutely must be able to change is the instructions' units. It currently outputs in imperial/English/us units but I need to be able to toggle to metric for some customers. How can I do this?
Thanks in advance,
Tony