map1 = {
const WIDTH = width
const HEIGHT = width * 0.6
let container = DOM.element('div', { style: `width:${WIDTH}px;height:${HEIGHT}px` })
yield container
const map = L.map(container)
.setView([46.7785, 6.6412], 14)
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map)
L.geoJSON(
{
type: 'Feature',
properties: { name: 'Yverdon' },
geometry: { type: 'Point', coordinates: [6.6412, 46.7785] }
},
{
onEachFeature: (feature, layer) => layer.bindPopup(feature.properties.name),
}
).addTo(map)
}