Skip to content

Commit

Permalink
created
Browse files Browse the repository at this point in the history
Signed-off-by: Imre Deak <[email protected]>
  • Loading branch information
ideak committed Feb 15, 2012
0 parents commit eb19167
Show file tree
Hide file tree
Showing 2 changed files with 765 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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/



Loading

0 comments on commit eb19167

Please sign in to comment.