ghybs / leaflet.markercluster.freezable Goto Github PK
View Code? Open in Web Editor NEWAdds ability to freeze clusters at specified zoom
License: MIT License
Adds ability to freeze clusters at specified zoom
License: MIT License
Hello ghybs,
thanks for your work.
I' am using your plugin to enable or disable Clustering in my project (with the latest source code of leaflet, markercluster and freezable). Well, it works fine unless Clustering is disabled and markers will be added afterwards. Those makers will be always clustered.
Updateing the map, for example moving, does partly solve the problem. It will be shown correctly disabled if I enable and disable Clustering again.
I wrote a similar example, as I am using in my project in jsfiddle, with a bit older source but with the same issue:
http://jsfiddle.net/tdj6gmbf/5/
Uncheck "Clustering" and then "Add"
Am I doing something wrong or is this a bug?
Great plugin!
Could newer Leaflet versions also be supported?
Correct the UMD wrapper, as done for Leaflet.FeatureGroup.SubGroup (see for example https://github.com/ghybs/Leaflet.FeatureGroup.SubGroup/releases/tag/v1.0.1)
Original issue: ghybs/Leaflet.MarkerCluster.LayerSupport#13
Avoid _originalOnAdd
property name because it collides with that plugin.
Since you mentioned in one of your so post answer that after un clustering when large number of markers are loading on the map, it will freeze/hang the browser. It is indeed happening in one of my project where browser is getting hung for 30-40 second then loading all the markers ( 20k+ ) on the map. Do you have solution to this in the version of plugin and can you guide me on this? Also it would be nicer to have a loader which will be notifying the progress of un clustering. Thanks.
Add the newly released versions to the demo page:
Center the titles in <th>
tags of the libraries versions table in the demo page.
I use a bower package for leaflet and leafler.MarkerCluster, so when I add "<script src="leaflet.markercluster.freezable.js"></script>" to my index.html file it throws an error, I think it's due to that the "Leaflet.MarkerCluster.Freezable" library is loaded before the others.
Is ther a bower package for "Leaflet.MarkerCluster.Freezable" ?
Performing a disableClustering() on a layer that has markers already unclustered, causes those markers to be removed from the feature group of that layer and only the newly unclustered ones to be visible. Panning the view slightly restores these removed markers back to the map.
I made a leaflet playground here:
http://playground-leaflet.rhcloud.com/bilav/1/edit?html,output
What I am doing is moving some markers between a regular cluster group and a freezable cluster group. I am doing this to make some individual markers not cluster sometimes.
I find that any marker that exists outside of the original view/zoom of the map disappears when I first add it to the frozen group. Panning the map or changing the zoom makes the markers appear as expected.
I use it without problems with leaflet-1.0.0 and Leaflet.markerCluster. Is leaflet-1.0.0 compatibility official?
If so we should update the README.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.