From 5f878131367d5bfc8bc10a74a43b6ef8af28f35d Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Thu, 12 Jul 2012 00:15:35 +0300 Subject: [PATCH] Syntax coloring for readme examples :) --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 58a5aca23a..e3c1781267 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,12 @@ Provides Marker Clustering functionality for Leaflet See the included example for usage. Create a new MarkerClusterGroup, add your markers to it, then add it to the map -```` + +```javascript var markers = new L.MarkerClusterGroup(); markers.addLayer(new L.Marker(getRandomLatLng(map))); map.addLayer(markers); -```` +``` For a more complete example see example/marker-clustering.html @@ -19,10 +20,10 @@ For a more complete example see example/marker-clustering.html As an option to MarkerClusterGroup you can provide your own function for creating the Icon for the clustered markers. The default implementation changes color at bounds of 10 and 100, but more advanced uses may require customising this. -```` +```javascript var markers = new L.MarkerClusterGroup({ options: { iconCreateFunction: function(childCount) { return new L.DivIcon({ html: '' + childCount + '' }); } }}); -```` \ No newline at end of file +``` \ No newline at end of file