M
M
mishazajceff2019-07-04 11:57:58
OpenStreetMap
mishazajceff, 2019-07-04 11:57:58

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

1 answer(s)
A
Andrew, 2019-07-04
@deepblack

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)?

For example, on Yandex.Maps
If you need an intermediate point, then just add it in the interface, and drag it anywhere with the mouse.
But after all, here you can change them, just drag the pointer.
If this is the whole point, then you can write your interface with the points you need in JavaScript using the Yandex.Maps API
spoiler
// Строим маршрут из Королева в Красногорск через Химки и Мытищи, где Мытищи - транзитная точка.
// Красногорск зададим координатами.
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 question

Ask a Question

731 491 924 answers to any question