Skip to content
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

cluster zoom-in partially not working #778

Open
bastianandre opened this issue Feb 6, 2017 · 2 comments
Open

cluster zoom-in partially not working #778

bastianandre opened this issue Feb 6, 2017 · 2 comments

Comments

@bastianandre
Copy link

bastianandre commented Feb 6, 2017

Hey there!

I encountered some strange behavior:

At a point, where there were 6 posts clustered together, the zooming-in by clicking on the cluster did not work properly, it just centered the map around the cluster. After a second click on the cluster, all pins and clusters disappeared altogether. I thought it cured itself after adding some more posts, but on 19 (also 21, 28, 33 and 56 and 57) clustered posts the same problem occurred.

Does anyone have a suggestion, why that might be, or experienced something similar?

PS: I tried clustering on different zoom levels, and different browsers – the issue stayed the same.
The Console did not throw any errors 🙁

PPS: the page I am referring to is http://tischnotizen.de/

@bastianandre
Copy link
Author

bastianandre commented Feb 23, 2017

UPDATE (for those who might experience a similar problem):

I was able to narrow it down. Other maps on my webpage, with the same configuration, work just fine, whereas the little preview map (300px by 200px) in my sidebar experiences the issues described above.
Now, my assumption is that the problem lies in the available dimensions of the map. If zooming-in and decluttering the markers would spread them too far apart to fit on the new zoom level, the cluster refuses to dissolve.

Is there an option to manipulate the cluster radius?
Or do you guys have another suggestion for a workaround?

@bastianandre bastianandre changed the title cluster zomm-in partially not working cluster zoom-in partially not working Feb 23, 2017
@cyberhobo
Copy link
Owner

Thanks for the research. I think this may be a known issue in the clustering library:

googlearchive/js-marker-clusterer#7

Unfortunately Google seems to have abandoned the library, but a user has forked it and made some updates:

https://github.com/gmaps-marker-clusterer/gmaps-marker-clusterer

I don't see that this particular issue has been addressed, but it might be worth some experimenting with the examples.

There is an action for modifying the clusterer options, but cluster radius is not one of them:

https://github.com/cyberhobo/wordpress-geo-mashup/blob/master/js/geo-mashup-markerclusterer.js#L56

Looking at that other issue, playing with the max zoom might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants