E
E
Eugene Zhadko2018-05-28 09:39:41
JavaScript
Eugene Zhadko, 2018-05-28 09:39:41

How to scale Yandex.Maps when hiding/showing a collection?

There are two groups of marks on Yandex maps.
Depending on the state of the radio button (checkbox), one of them is displayed.

How to zoom in/zoom out the map, to the center of the label, when toggling the radio button?
fiddle: https://jsfiddle.net/338za0mj/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-05-28
@Jeka778

To do this, use the setBounds and getBounds methods. Like so .
UPD. Taken from the comments:
After calling setBounds, you can check the current zoom, and if it is more than the allowed one, set how much you need. Like so .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question