-
Notifications
You must be signed in to change notification settings - Fork 989
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
Doesn't display anything when only one marker is present #1063
Comments
Were you able to solve this? I'm having the same issue. |
@BartjeD Unfortunately, no. |
I worked around it by adding a fake marker if there was only 1 marker in the collection. Obviously we needed to adjust the count mechanism as well, to exclude the fake marker from the count. It's very ugly and probably only works in this exact situation. We noticed sometimes clusters with only 1 marker also don't show on the map, so we suddely miss clusters after zooming. But I didn't take it that far. (yet) |
Sounds like a good enough workaround. But I guess there won't be any one-marker clusters. From what I understood, the plugin displays the marker instead of cluster in the only-one-marker case, even after zooming in. |
They overlap perfectly if you copy the coordinates, you can also hide them via CSS if you want. In our case we don't show the markers. For low-zoom navigation purposes. |
We're still using the mentioned work around. |
If it helps anyone my solution is to just skip the usage of markercluster and add it directly to the map instead when there is only one marker |
Hi everyone, Please, have a look at I provided a description as to why this occurs. Hope it helps |
In our case we still require the work around even if we apply the zoom rounding you mentioned. @BeAllAround It doesn't seem to be the same issue. |
I'm not reporting a bug, asking for help.
Clustering works properly when multiple (even only 2) markers are present but when I filter to 1 marker, it's not displaying anything. But in a different project it works fine even when it's just 1 marker i.e. it displays the marker icon instead of cluster icon and that's fine. I'm using almost the same code in both projects. Any idea what could cause this problem of not displaying, theoretically?
The text was updated successfully, but these errors were encountered: