map = {
let container = DOM.element('div', { style: `width:${width}px;height:${width/1.6}px` });
yield container;
let map = L.map(container).setView([40.6936, -73.9833], 15);
let osmLayer = L.tileLayer('https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}@2x.png', {
attribution: 'Wikimedia maps beta | © <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.geoJson(randomPoints, {size: 1}).addTo(map);
L.geoJson(clusterGeometries, {
weight: 1,
color: '#0F0',
onEachFeature: function(feature, layer) {
const area = turf.area(feature);
layer.bindPopup(`Cluster area: <b>${area} m<sup>2</sup></b>`);
},
}).addTo(map);
}