From f88c310209b7d22beec0dd57c4e141dfd5abe6cd Mon Sep 17 00:00:00 2001 From: danzel Date: Fri, 17 Aug 2012 10:00:16 +1200 Subject: [PATCH] Use a div instead of an iframe for the map. Mention some more features. We work in IE6. --- ...uest-post-markerclusterer-0-1-released.md} | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) rename _posts/{2012-08-16-guest-post-markerclusterer-0-1-released.md => 2012-08-17-guest-post-markerclusterer-0-1-released.md} (73%) diff --git a/_posts/2012-08-16-guest-post-markerclusterer-0-1-released.md b/_posts/2012-08-17-guest-post-markerclusterer-0-1-released.md similarity index 73% rename from _posts/2012-08-16-guest-post-markerclusterer-0-1-released.md rename to _posts/2012-08-17-guest-post-markerclusterer-0-1-released.md index 87ffadca..5c4a93a2 100644 --- a/_posts/2012-08-16-guest-post-markerclusterer-0-1-released.md +++ b/_posts/2012-08-17-guest-post-markerclusterer-0-1-released.md @@ -1,6 +1,6 @@ --- layout: post -title: Guest Post - Leaflet.MarkerClusterer 0.1 Released +title: Guest Post - Leaflet.MarkerCluster 0.1 Released description: Leaflet now has its own MarkerClustering Plugin to reduce the visual clutter on your maps. author: Dave Leaver authorsite: https://github.com/danzel/ @@ -15,18 +15,20 @@ We needed something like this, but in Leaflet. In the spirit of open source we d So we proudly present Leaflet.MarkerCluster. - +
The clusterer has all sorts of great built in behaviour: * Markers that don't need clustering aren't and will be visible at the relevant levels. - * Cluster and markers that are further than a screen width from the view port are removed from the map to increase performance. - * Everything is brilliantly animated. As you zoom in and out you can logically see which clusters have become which markers. + * When you mouse over a cluster the bounds of the marker within that cluster are shown. + * Clicking a cluster will zoom you in to the bounds of its children. * At the bottom zoom level if there are still clusters you can click on them to 'spiderfy' them, which shows the individual markers within the cluster. (Based on jawj's Overlapping MarkerSpidifer) - * As with core Leaflet, everything works on Mobile and on the desktop is tested all the way back to IE7. + * Everything is brilliantly animated. As you zoom in and out you can logically see which clusters have become which markers. + * Cluster and markers that are further than a screen width from the view port are removed from the map to increase performance. + * As with core Leaflet, everything works on Mobile and on the desktop is tested all the way back to IE6. * It is based on L.FeatureGroup to provide the interaction for the markers contained with in it. - * Supports Adding and Removing Markers after being added to the map. + * Supports Adding and Removing Markers after being added to the map (See Best Practices below!). ### Usage @@ -44,7 +46,7 @@ You can also use all of the L.FeatureGroup event features for both individual ma ### Best Practices - * To get the best performance from the clusterer you should add all of your markers to it before adding it to the map (like we did above). + * To get the best performance from the clusterer you should add all of your markers to it before adding it to the map (like we did in the example). * If you are going to move a marker that is in a L.MarkerClusterGroup you must remove it first, then move it, then re-add it. If you move it while it is in the MarkerClusterGroup we can't track it and that marker will become lost. * Although the clusterer supports having markers added and removed from it while it is on the map it does not perform as well as when they are added while it is not on the map. If you need to do a large update to the markers in a MarkerClusterGroup you may want to remove it from the map, change the markers then re-add it. @@ -74,5 +76,34 @@ I hope you enjoy using the clusterer and get everything you want out of it. If y If you have any issues also please log a bug on the github page. -Enjoy! -Dave Leaver. \ No newline at end of file +Enjoy!
+Dave Leaver. + + + + + + + + + +