Answer the question
In order to leave comments, you need to log in
How to put marks on the map and build arbitrary routes between them?
Good afternoon!
Tell me, please, is there any service where you can set labels, and then build car routes between them in an arbitrary order in the interface (change the start and end points from the set of labels)?
Answer the question
In order to leave comments, you need to log in
where can I set labels, and then in the interface build car routes between them in an arbitrary order (change the start and end points from the label set)?
// Строим маршрут из Королева в Красногорск через Химки и Мытищи, где Мытищи - транзитная точка.
// Красногорск зададим координатами.
ymaps.route([
'Королев',
{ type: 'viaPoint', point: 'Мытищи' },
'Химки',
{ type: 'wayPoint', point: [55.811511, 37.312518] }
], {
mapStateAutoApply: true
}).then(function (route) {
route.getPaths().options.set({
// в балуне выводим только информацию о времени движения с учетом пробок
balloonContentBodyLayout: ymaps.templateLayoutFactory.createClass('$[properties.humanJamsTime]'),
// можно выставить настройки графики маршруту
strokeColor: '0000ffff',
opacity: 0.9
});
// добавляем маршрут на карту
map.geoObjects.add(route);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question