You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been noticing that pruneCluster.BuildLeafletCluster = function(cluster, position) {...} does not always return the correct cluster/position. When there are multiple clusters on the map, it sometimes return another cluster.
This happens sporadically. I'd say it happens 1 in 50 or 1 in 100? I tried tracking down the issue but the randomness of its occurrence makes it very difficult.
Can anyone provide some insights as to why this could be happening?
Sample code:
pruneCluster.BuildLeafletCluster = function(cluster, position) {
let m = new L.Marker(position, {
icon: pruneCluster.BuildLeafletClusterIcon(cluster)
});
m.on('click', function() {
let markers = cluster.GetClusterMarkers();
})
return m;
}
EDIT: I managed to catch one instance of this, where the cluster is empty (even though there is 21 markers in this cluster). console.log shows that the cluster object has these weird properties:
EDIT: I correct what I said earlier about it happening randomly. It does not happen randomly and happens to clusters in particular positions. Still trying to figure out the cause.
The text was updated successfully, but these errors were encountered:
Valachio
changed the title
GetClusterMarkers() accuracy
BuildPruneCluster cluster/position sometimes gets another cluster
Mar 19, 2019
Valachio
changed the title
BuildPruneCluster cluster/position sometimes gets another cluster
BuildPruneCluster cluster/position sometimes gets another cluster or cluster is empty
Mar 19, 2019
So I've been noticing that
pruneCluster.BuildLeafletCluster = function(cluster, position) {...}
does not always return the correct cluster/position. When there are multiple clusters on the map, it sometimes return another cluster.This happens sporadically. I'd say it happens 1 in 50 or 1 in 100? I tried tracking down the issue but the randomness of its occurrence makes it very difficult.
Can anyone provide some insights as to why this could be happening?
Sample code:
EDIT: I managed to catch one instance of this, where the cluster is empty (even though there is 21 markers in this cluster).
console.log
shows that thecluster
object has these weird properties:EDIT: I correct what I said earlier about it happening randomly. It does not happen randomly and happens to clusters in particular positions. Still trying to figure out the cause.
The text was updated successfully, but these errors were encountered: