Answer the question
In order to leave comments, you need to log in
How to get the distance between two points?
Hello!
Tell me how to get the distance between two points that are already known in advance?
An implementation where there is a form and you need to manually specify the points - it doesn’t fit
. My brain has already moved, I don’t understand, help me out.
Further this data will be processed in the calculator
<script> function init() {
// Создаем карту с добавленными на нее кнопками.
var myMap = new ymaps.Map('map', {
center: [55.734876, 37.59308],
zoom: 9,
controls: ['zoomControl', 'fullscreenControl']
}, {
buttonMaxWidth: 300
});
var multiRoute = new ymaps.multiRouter.MultiRoute({
// Описание опорных точек мультимаршрута.
referencePoints: ,
// Параметры маршрутизации.
params: {results: 1}
}, {
// Путевые точки можно перетаскивать.
// Маршрут при этом будет перестраиваться.
wayPointDraggable: true,
boundsAutoApply: true,
// Автоматически устанавливать границы карты так, чтобы маршрут был виден целиком.
zoomMargin: 30
});
myMap.behaviors.disable('scrollZoom');
// Добавляем мультимаршрут на карту.
myMap.geoObjects.add(multiRoute);
}
ymaps.ready(init);
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question