I don't quite get how to apply options to the leaflet routing machine. This is the basic code to use the routing :
var map = L.map('map');
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.Routing.control({
waypoints: [
L.latLng(57.74, 11.94),
L.latLng(57.6792, 11.949)
]
}).addTo(map);
Now, what I wanna do is, hide the itinerary text, from what I wrote in the API it should look like this :
L.Routing.itinerary({
show: false
}).addTo(map);
But this isn't working, when I try to make the markers not draggable and make the route not changeable it also doesn't work, I think I'm doing something wrong, 'cause I can change what ever I want in the code, it won't change anything about the display...
Basically what I wanna do is show a route that cannot be changed by dragging the markers and no itinerary text, in other words, you cannot change the original display.
Thanks for your time !