Open RoboVij opened 2 years ago
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. Just copy the position of the first marker and it displays the markers on the map.
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. If we can recognize those clusters with only one marker programatically this hack wil also work there.
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. With only the clusters it wasn't a problem anyway.
Hi @BartjeD @RoboVij I am experiencing the same issue Did you find any good solution to the problem?
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?