From 626c2c61f79b3297eec7175eeecf2e40a23ac69d Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Wed, 27 Feb 2013 11:26:00 +0100 Subject: [PATCH] Fix example of passing options to constructor --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13a5bde33..b2f44b6e0 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,11 @@ You do not need to include the .Default css if you go this way. You are passed a MarkerCluster object, you'll probably want to use getChildCount() or getAllChildMarkers() to work out the icon to show ```javascript -var markers = new L.MarkerClusterGroup({ options: { +var markers = new L.MarkerClusterGroup({ iconCreateFunction: function(cluster) { return new L.DivIcon({ html: '' + cluster.getChildCount() + '' }); } -}}); +}); ``` Check out the [custom example](http://leaflet.github.com/Leaflet.markercluster/example/marker-clustering-custom.html) for an example of this.