leafletMap = function* (geojson) {
if (!geojson.features.length) {
yield "Waiting for input";
return;
}
const container = DOM.element("div", {
style: `width:${width}px;height:${width / 1.6}px`
});
yield container;
const map = L.map(container);
const data = L.geoJson(geojson).addTo(map);
const osmLayer = L.tileLayer(
"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}@2x.png"
).addTo(map);
map.fitBounds(data.getBounds());
}