lpongetti / flutter_map_marker_cluster

Provides beautiful animated marker clustering functionality for flutter_map. Inspired by Leaflet.markercluster
BSD 3-Clause "New" or "Revised" License
243 stars 215 forks source link

Why do the children of MarkerClusterNode depend on the zoom level in the onClusterTap? #177

Closed Long9725 closed 9 months ago

Long9725 commented 10 months ago
IMG_6864 IMG_6865
Parent cluster node with two cluster child Child cluster nodes

Expect the length of children of parent is always 2, but it depended on the zoom level. When zoom level is 11, the length is 1. But zoom level is 16 (before the cluster disintegrates), the length is 2 and it's same the real length. Why do the children depend on the zoom level?

# parent log when zoom level is 11

[MarkerClusterNode] 
current node runtimeType: MarkerClusterNode, 
zoom: 11, 
children: [Instance of 'MarkerClusterNode'], 
markers: [Instance of 'MarkerNode', Instance of 'MarkerNode', Instance of 'MarkerNode', Instance of 'MarkerNode']

# parent log when zoom level is 16

[MarkerClusterNode] 
current node runtimeType: MarkerClusterNode, 
zoom: 16, 
children: [Instance of 'MarkerClusterNode', Instance of 'MarkerClusterNode'], 
markers: [Instance of 'MarkerNode', Instance of 'MarkerNode', Instance of 'MarkerNode', Instance of 'MarkerNode']
MarkerClusterLayerOptions(
  onClusterTap: (markerClusterNode) {
    log("current node runtimeType: ${markerClusterNode.runtimeType},\nzoom: ${markerClusterNode.zoom},\nchildren: ${markerClusterNode.children},\nmarkers: ${markerClusterNode.markers}",
        name: "MarkerClusterNode");
  },
)
github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 9 months ago

This issue was closed because it has been stalled for 5 days with no activity.