Skip to content

[BUG] Batch clustering issues. #114

Closed
@Driklyn

Description

PROBLEMS

Two bugs I've recently noticed with clustering when adding an array of markers in batches:

  1. Cluster icons are generally not updated to reflect the current number. Their zoom boundaries are however.

  2. Clicking a cluster at max zoom so it spiderfies and clicking elsewhere (so it unspiderfies) gives this error after a few times:

Uncaught TypeError: Cannot set property '_leaflet_pos' of undefined.

Here's the relevant stack trace for it:

L.MarkerCluster.include.L.DomUtil.TRANSITION._animationUnspiderfy leaflet.markercluster-src.js:1722
L.MarkerCluster.include.unspiderfy leaflet.markercluster-src.js:1514
L.MarkerClusterGroup.include._unspiderfy leaflet.markercluster-src.js:1836
L.MarkerClusterGroup.include._unspiderfyWrapper leaflet.markercluster-src.js:1831

DEMO

The demo is set up so that every second 100 new markers are added. Steps to reproduce each bug:

  1. Just load the demo and wait a few seconds for the screen to get some clusters. You should notice that they all say 2, even though some will have more than that (which can be verified by clicking or hovering to see the zoom boundary).

  2. Randomly click clusters until clicking no longer does anything, then check the console.

http://jsfiddle.net/CAZRk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions