FIX цвет линии маршрута
This commit is contained in:
parent
b25bf536ff
commit
ed1852f859
|
|
@ -56,15 +56,14 @@ function buildRoute(fit)
|
|||
console.error(err);
|
||||
alert('Произошла ошибка. Вероятно построить маршрут по выбранным точкам невозможно.');
|
||||
} else {
|
||||
route = L.Routing.line(routes[0]);
|
||||
distance = Math.round(routes[0].summary.totalDistance / 1000);
|
||||
$('#routeDistance').html('Протяженность <b>' + distance + '</b> км.');
|
||||
|
||||
route.options.styles = [
|
||||
route = L.Routing.line(routes[0], {styles:[
|
||||
{color: 'black', opacity: 0.5, weight: 9},
|
||||
{color: 'green', opacity: 0.7, weight: 7},
|
||||
{color: 'orange', opacity: 1, weight: 3}
|
||||
];
|
||||
]});
|
||||
|
||||
distance = Math.round(routes[0].summary.totalDistance / 1000);
|
||||
$('#routeDistance').html('Протяженность <b>' + distance + '</b> км.');
|
||||
|
||||
route.addTo(myMap);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue