Answer the question
In order to leave comments, you need to log in
How to center route Yandex maps from a closed container?
I'm trying to center a route built in Yandex Maps using route in a closed container. The route method has an option mapStateAutoApply: true , but it doesn't work in a hidden container. The geometry route.geometry returns null and setBound is therefore not taken either.
What other ways are there to center the maps on the constructed route?
Oh yes, if there can still be other elements on the map, and myMap.setBounds(myMap.geoObjects.getBounds()); also does not fit, you need to center the desired route .
Example attached: https://codepen.io/corsik/pen/LYpMeJP
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