map = {
let container = DOM.element('div',{style:`width:${width/1.6}px;height:${width/1.6}px`});
yield container;
let map = L.map(container).setView(cen, 13);
let osmLayer = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
subdomains: 'abcd',
maxZoom: 19
}).addTo(map);
var circle1 = L.circle([lat, lon], {
color: 'grey',
fillColor: 'orange',
fillOpacity: 0.2,
radius: 2000
}).addTo(map);
var circle2 = L.circle([lat, lon], {
color: 'grey',
fillColor: 'orange',
fillOpacity: 0.1,
radius: 5500
}).addTo(map);
var iconH = L.icon({
iconUrl: 'https://icons.veryicon.com/png/o/business/wb-legend-of-shanghai-ocean-bearing-body/wb_-hospital.png',
iconSize:[40,40]
});
hospitals.forEach((h)=>{
const marker = L.marker([h.lat, h.lon],{icon:iconH}).addTo(map);
const note = h.tags.note ? `<br>${h.tags.note}` : ""
marker.bindPopup(`🏥<strong>${h.tags.name}</strong>${note}`);
})
gp.forEach((g)=>{
const marker = L.marker([g.lat, g.lon]).addTo(map);
const note = g.tags.note ? `<br>${g.tags.note}` : ""
marker.bindPopup(`🏥<strong>${g.tags.name}</strong>${note}`);
})
}