centerpoint = {
let map = new mapboxgl.Map({
container: mapContainer,
center: [0, 0],
zoom: 0,
style: blankStyle
});
map.on('click', 'fire', function (e) {
console.log(e.features[0].properties);
new mapboxgl.Popup()
.setLngLat(e.lngLat)
.setHTML(e.features[0].properties.name)
.addTo(map);
});
map.addControl(new mapboxgl.NavigationControl());
map.addControl(new mapboxgl.FullscreenControl());
map.on('load', function () {
map.addLayer({
"id": "circle-id",
"type": "circle",
"source": {
"type": "geojson",
"data": nullIsland
},
"paint": {
'circle-opacity': 0.8,
'circle-color': 'rgb(255, 0, 0)'
}
});
map.addLayer({
"id": "nullislandgrid",
"type": "line",
"source": {
"type": "geojson",
"data": nullIslandGrid
},
"layout": {
"line-join": "round",
"line-cap": "round"
},
"paint": {
"line-color": "black",
"line-width": 1
}
});
});
return Generators.observe(change => {
map.on('mousemove', e => {
change(e.lngLat);
});
});
}