<!--
Include Leaflet.markercluster's CSS and JavaScript assets.
Unlike mapbox.js, these are not hosted by MapBox; you will
need to download and host them yourself.
Note that the 0.2 release of Leaflet.markercluster is not
compatible with the version of Leaflet used by mapbox.js.
This example uses assets from the master branch (@ 6fda9a206)
of https://github.com/Leaflet/Leaflet.markercluster.
-->
<link rel="stylesheet" href="/mapbox.js/assets/MarkerCluster.css" />
<link rel="stylesheet" href="/mapbox.js/assets/MarkerCluster.Default.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="/mapbox.js/assets/MarkerCluster.Default.ie.css" />
<![endif]-->
<script src="/mapbox.js/assets/leaflet.markercluster.js"></script>
<!-- Example data. -->
<script src="/mapbox.js/assets/realworld.388.js"></script>
<div id='map'></div>
<script type='text/javascript'>
var map = L.mapbox.map('map', 'examples.map-9ijuk24y')
.setView([-37.82, 175.215], 14);
var markers = new L.MarkerClusterGroup();
for (var i = 0; i < addressPoints.length; i++) {
var a = addressPoints[i];
var title = a[2];
var marker = L.marker(new L.LatLng(a[0], a[1]), {
icon: L.mapbox.marker.icon({'marker-symbol': 'post', 'marker-color': '0044FF'}),
title: title
});
marker.bindPopup(title);
markers.addLayer(marker);
}
map.addLayer(markers);
</script>