grandCentralMap = {
let container = DOM.element('div', { style: `width:${width}px;height:${500}px` });
yield container;
let map = L.map(container, {
center: [4.602891, -74.065569],
zoom: 20,
inertia: false
});
const toxy = (lat, long) => map.latLngToLayerPoint([lat,long]);
let osmLayer = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}@2x.png').addTo(map);
L.svg({clickable:true}).addTo(map);
const overlay = d3.select(map.getPanes().overlayPane)
const svg = overlay.select('svg').attr("pointer-events", "auto");
const points = svg.selectAll('circle').attr("class", "points")
.data(data)
.join('circle')
.attr("fill", "blue")
.attr("stroke", "black")
.attr("cx", d => toxy(d.lat, d.long).x)
.attr("cy", d => toxy(d.lat, d.long).y)
.attr("r", map.getZoom() * 0.5)
.on('mouseover', function(event, d) {
d3.select(this).transition()
.duration(100)
.attr('r', 20)
.attr("fill", "white")
.style("cursor", "pointer")
const {x, y} = toxy(d.lat, d.long);
svg.append('text').text(d.nombre).attr("x", x).attr("y", y).attr("stroke", "black");
})
.on('mouseout', function() {
d3.select(this).transition()
.duration(100)
.attr("fill", "blue")
.attr('r', map.getZoom() * 0.5)
svg.selectAll('text').remove();
});
const update = () => points
.attr("cx", d => toxy(d.lat, d.long).x)
.attr("cy", d => toxy(d.lat, d.long).y)
.attr("r", map.getZoom() * 0.5)
map.on("zoomend", update)
}