D
D
Denis Adamov2020-10-03 03:04:08
JavaScript
Denis Adamov, 2020-10-03 03:04:08

How to get the route length in kilometers Yandex Maps?

Greetings, I'm trying to deal with yandex api, I need to get the distance in kilometers between two points on the map. I deduced the route between these points using a simple example from the documentation

var multiRoute = new ymaps.multiRouter.MultiRoute({
        referencePoints: [
            "Санкт-Петербург",
            "Москва"
        ],
        // Параметры маршрутизации.
        params: {
            results: 2
        }
    }, {
        boundsAutoApply: true
    });

But I don't understand how to get the distance between them for further calculations.
Need your help gentlemen

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question