Added hotline based route overlay

Added a overlay which reflects the quality of the route based on either:
* cost
* altitude
* incline
This commit is contained in:
Unknown 2019-10-01 15:46:09 +02:00 committed by Matzepan
parent 90dfa5b7f3
commit 9eeca7e2d5
7 changed files with 269 additions and 1 deletions

View file

@ -199,6 +199,8 @@
requestUpdate: requestUpdate
});
routingPathQuality = new BR.RoutingPathQuality(map, layersControl);
routing = new BR.Routing({
routing: {
router: L.bind(router.getRouteSegment, router)
@ -233,6 +235,7 @@
segmentsLayer = routing._segments;
elevation.update(track, segmentsLayer);
routingPathQuality.update(track, segmentsLayer);
if (BR.conf.transit) {
itinerary.update(track, segments);
} else {
@ -244,6 +247,7 @@
}
routing.addTo(map);
routingPathQuality.addTo(map);
elevation.addBelow(map);
sidebar = BR.sidebar({