All of the examples of Leaflet routing control display the result (iterenary) inside the map area.
I want to display it outside in a div
or table
element. There is ItineraryBuilder in the API but no example on how to use it.
My code
routing = L.Routing.control({
waypoints: [
L.latLng(37.56569, 22.8),
L.latLng(37.56569, 22.7)
],
routeWhileDragging: true,
itineraryFormatter: "test"
}).addTo(map);
I want the iterenary to be displayed in textarea below Path Data
<div class="form-group">
<label for="path-results">Path data</label>
<textarea class="form-control form-control-sm test" readonly id="path-results" rows="8"></textarea>
</div>