Answer the question
In order to leave comments, you need to log in
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());
});
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