E
E
Extramezz2016-04-27 14:45:03
JavaScript
Extramezz, 2016-04-27 14:45:03

How to hide certain YandexMaps elements depending on the map block size?

Good afternoon. I use the Yandex Maps API on my website .

Tell me how to set up YaMaps so that certain interface elements are hidden on them at a certain size. But this is not very pretty:

nB8a2zK.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2016-04-28
@byte916

When initializing the map, specify which elements you want to show, for example

myMap = new ymaps.Map("map", {
        bounds: coord,
        controls: ['zoomControl']
    })

The list of all elements is here (look in the menu, in the control section), it also says how to show and hide them on the fly, without reinitializing the map.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question