custom L.Routing styling (dashed drawing line, red error line)

This commit is contained in:
Norbert Renner 2014-08-06 10:53:49 +02:00
parent fd98a2f102
commit c4cd00ff9d

View file

@ -135,9 +135,21 @@
routingOptions.setCustomProfile(null);
});
routing = new BR.Routing({routing: {
router: L.bind(router.getRouteSegment, router)
}});
routing = new BR.Routing({
routing: {
router: L.bind(router.getRouteSegment, router)
},
styles: {
trailer: {
dashArray: [10, 10],
opacity: 0.4
},
track: {},
nodata: {
color: 'darkred'
}
}
});
routing.on('routing:routeWaypointEnd', function(evt) {
onUpdate(evt && evt.err);
});