Z
Z
Z Sh2015-11-23 12:08:05
JavaScript
Z Sh, 2015-11-23 12:08:05

How to print a Yandex map?

The site has a Yandex map with a route created by api, you need to print it. I'm thinking of doing it myself
by getting a picture through the static api of the maps, but I just can't get the tops of the broken route from the map in order to transfer it to the static api.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas, 2015-11-23
@dergus

I understand that you create a route using the route method?
Then route.getPaths()it will return you a collection of route parts. The elements of this collection have a geometry property .
This should be enough.

route.getPaths().each(function(v,i) {
 console.log(v.getSegments());
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question