map = {
let container = DOM.element('div', { style: `width:${width}px;height:${width/1.6}px` });
yield container;
let map = L.map(container).setView([51.4976593, -0.1339468], 11);
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);
var showLabels = true;
var scope = 'world'
var geoData = scope === 'world' ? "https://raw.githubusercontent.com/datasets/geo-countries/master/data/countries.geojson" : "https://raw.githubusercontent.com/phylogeography/SpreaD3/master/data/continuous/Nuno/portugal.geojson"
$.getJSON(geoData,function(data){
L.geoJson(data).addTo(map);
});
if(showLabels) {
console.log('triggrd')
L.tileLayer('http://tile.stamen.com/toner/{z}/{x}/{y}.png', {
subdomains: 'abcd',
maxZoom: 19
}).addTo(map);
}
L.circle([51.508, -0.11], {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.2,
radius: 5000
}).addTo(map);
}