New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hiding markers is still displaying clusters with size 0 #267
Comments
@yanngit Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
I just noticed this as well. I also tried various methods from here such as removing each marker, resetting or using the Still returning the size 0. |
There are two separate issues going on here.
|
In the previous Can that be added to this version? |
The workaround is to remove the marker from the MarkerClusterer when removing from the map or setting visible to false. There are other related cases that could maybe be addressed:
|
So far the only workaround, in my case, is to use the |
I worked around this issue by adding the renderer and setting the visibility of a cluster marker like this: visible: cluster.count > 0, |
I encountered the same problem. If you use |
I should have solved the problem by using |
Hi,
I'm currently building an interactive map with markers. So my code is adding a map with various markers, then adding a clustering and everything is working fine. Issue is appearing when I'm starting to hide some markers, by using
marker.setVisible(false)
and then rendering again my clusterer, withmarkerClusterer.render()
. I can see on my map some cluster with size 0 appearing where I've hidden some markers.Environment details
1.Using script api
<script src="https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js"></script>
2. Inside a vuejs app
Steps to reproduce
You should see like me clusters of size 0
Code example
Rapid fiddle here : https://jsfiddle.net/2vzayxc4/3/
Click on hide button under the map, and zoom out to see it happening.
Thanks for the help, it's driving me crazy ;)
The text was updated successfully, but these errors were encountered: