R
R
Rostislav2017-04-14 20:37:04
JavaScript
Rostislav, 2017-04-14 20:37:04

How to get directions off-road in Yandex Maps API?

You need to lay a route on the map from the point to the house. But Yandex believes that there is no road between the last and penultimate points. The pedestrian route draws, but the car route does not.
I do it like this:

ymaps.route([
                    {type: 'wayPoint', point: [55.607387, 37.459253]},
                    {type: 'wayPoint', point: [55.607506, 37.465213]},
                    { type: 'wayPoint', point: [55.607928, 37.464497] }
                ]
            ).then(function (route) {
                route.getPaths().options.set({
                    strokeColor: 'f00',
                    strokeWidth: 5,
                    opacity: 0.7
                });
                myMap.geoObjects.add(route.getPaths());
            });

I tried to blind the car and pedestrian route, but I can't remove the "65m" icon.
Need to get a clean route (only red line) to the house.
Tell me how to remove this icon or how to make Yandex pave a car route to the house?
bbd1b2a10eef433798deec98a148c5d5.jpg

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