Skip to content
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

Modified clusters to remain spidered when markers are added or removed. #435

Closed
wants to merge 2 commits into from

Conversation

teastman
Copy link

This code attempts to fix issue 318.

It works via keeping track of what markers are currently visible in the spidered cluster when adding or removing markers. It then searches for the base cluster at the current zoom level and expands it.

@danzel
Copy link
Member

danzel commented Dec 21, 2015

Please remove your dist/ changes from this PR.

@@ -37,6 +37,26 @@ L.MarkerCluster = L.Marker.extend({
return storageArray;
},

// Searches through self and all decendants for a given marker. Returns the cluster that directly contains it.
getClusterDirectlyContaining: function (marker) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just use marker.__parent instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spiderified markers collapse every time some markers are added to the cluster
2 participants