map = {
const container = yield htl.html`<div style="height: 500px;">`;
const map = L.map(container).setView([46.72, 7.862311288115387], 8);
L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", {
attribution: "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
}).addTo(map);
L.marker([46.461599599561545, 7.862311288115387],
{
title: "Switzerland",
opacity: 0.9,
riseOnHover: true}).bindPopup("Switzerland. Full of mountains, cheese and chocolates and with French, German and Italian influences, Switzerland is a great place to visit.").
addTo(map);
L.marker([45.98142514598109, 7.659203753876486],
{ icon: mountainIcon,
title: "The Matterhorn",
opacity: .9,
riseOnHover: true}).bindPopup("Fun fact: When the famous chocolate, Toblerone, relocated their factory out of Switzerland they had to take the Matternhorn off their recognizable triangular chocolate boxes. You can only use Swiss branding if your company is Switerland-based.").
addTo(map);
circleAttributes.forEach(function(item) {
L.circleMarker([item.lat, item.lng],
{ radius: item.population/10000
}).bindPopup(item.name + " has a population of " + item.population).addTo(map);
});
}