Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Port of the Google Maps MarkerClusterer for Leaflet
JavaScript
branch: master

Fix for versions of IE that don't support the addEventListener method.

Signed-off-by: spospy <pospisil@gmail.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
latest commit f568d96d30
spospy authored Imre Deak committed
Failed to load latest commit information.
README created
leafclusterer.js Fix for versions of IE that don't support the addEventListener method.

README

The API is similar to that of the Google Maps version ([1]):

var map = new L.Map('map');
var lat = ...;
var lng = ...;
var pos = new L.LatLng(lat, lng);
var zoom = 4;
map.setView(pos, zoom);

var clusterer = new LeafClusterer(map);

var lat = ...;
var lng = ...;
var pos = new L.LatLng(lat, lng);
var marker = new L.Marker(pos);
clusterer.addMarker(marker);

or for batched addition:

var markers=[];
for each marker (m) {
   markers.push(m);
}

clusterer.addMarkers(markers);



[1] http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/



Something went wrong with that request. Please try again.