diff --git a/config.js b/config.js index 9a2c856..78ddf63 100644 --- a/config.js +++ b/config.js @@ -85,6 +85,26 @@ // 0 = no minimum, use stored setting; 1 = always reset to full visibility on load BR.conf.minOpacity = 0.3; + BR.conf.routingStyles = { + trailer: { + dashArray: [10, 10], + opacity: 0.6, + color: 'magenta' + }, + track: { + color: 'magenta', + opacity: BR.conf.defaultOpacity + }, + trackCasing: { + weight: 8, + color: 'white', + // assumed to be same as track, see setOpacity + opacity: BR.conf.defaultOpacity + }, + nodata: { + color: 'darkred' + } + }; // transit (intermodal routing) demo config if (BR.conf.transit) { diff --git a/js/index.js b/js/index.js index 33043a3..7e0f851 100644 --- a/js/index.js +++ b/js/index.js @@ -159,26 +159,7 @@ routing: { router: L.bind(router.getRouteSegment, router) }, - styles: { - trailer: { - dashArray: [10, 10], - opacity: 0.6, - color: 'magenta' - }, - track: { - color: 'magenta', - opacity: BR.conf.defaultOpacity - }, - trackCasing: { - weight: 8, - color: 'white', - // assumed to be same as track, see setOpacity - opacity: BR.conf.defaultOpacity - }, - nodata: { - color: 'darkred' - } - } + styles: BR.conf.routingStyles }); routing.on('routing:routeWaypointEnd routing:setWaypointsEnd', function(evt) {