E
E
Evgeny Vasiliev2015-05-13 17:00:07
Yandex maps
Evgeny Vasiliev, 2015-05-13 17:00:07

How to create a label hiding at a certain scale on the map?

It is necessary to add points (Placemark) to the map that will be hidden at a certain scale, for example: one point should be displayed at scales from 9 to 15 (max. value), the second should be shown from 4 to 15, and the third - from 3 to 15.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Vasiliev, 2015-05-14
@johny

Something like this:

ymaps.geoQuery(myMap.geoObjects)
  .search('properties.minZoom > ' + zoom + '')
  .setOptions('visible', false);
ymaps.geoQuery(myMap.geoObjects)
  .search('properties.minZoom <= ' + zoom + '')
  .setOptions('visible', true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question