fountainsHeatmap = {
let container = DOM.element('div', { style: `width:${width}px;height:${width/1.6}px` });
yield container;
let map = L.map(container).setView([40.4167754, -3.7037902], 13);
let osmLayer = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}@2x.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
let fuentesPoints = []
fuentes.forEach(d =>{
if(isNaN(parseFloat(d.longitud)) || isNaN(parseFloat(d.latitud)) ) {
return
}
else {
fuentesPoints.push([d.latitud,d.longitud,1])
}
})
let fuentesLayer = heatLayer(fuentesPoints).addTo(map);
}