E
E
ex3xeng2017-09-19 19:11:58
JavaScript
ex3xeng, 2017-09-19 19:11:58

How to hide markers on zoom (smart hide)?

Hello toaster!
Not long ago I ran into the site of an air aggregator; markers on the map are interestingly implemented in it. If you zoom in / out distances, then the markers are not just clustered, they are hidden along with the point to which they are attached (as I understand it), that is, if the Label / Layout of the city where the marker is located is hidden, then it also disappears.
Here's what I managed to do ( example )
They threw the marker using HTML, with this I figured out I threw a couple of markers on the map, but how to hide / show the marker when zooming and how to bind it to the layer?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Pushkarev, 2017-09-19
@AXP-dev

You need clustering https://asmaloney.com/2015/06/code/clustering-mark...

F
freeExec, 2017-09-19
@freeExec

I thought, really, something interesting. And you look closely, they have duplicated inscriptions there. That is, it is simply predetermined at what zoom to show the marker. Those. It has nothing to do with the label on the map.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question