How to calculate the length between two points on maps Yandex?

Good day, tried using Yandex maps to determine the distance between two points on the map.
Used by this information from the API Yandex.Cards.
But something I can't do anything. My goal is just to bring to alert the value (routeLength) the distance between geographic features. It can be a street in a city or the distance between the cities.
It would be cool to read step by step instructions (if there is a link, show pliz) or can anyone have a live example of implementing such calculations.
July 9th 19 at 11:08
1 answer
July 9th 19 at 11:10
Solution
Use the route api. There's a great method getDistance. You can get the length of the route with traffic and without.

Find more questions by tags JavaScript