viewof centerpoint = {
let container = html`<div style='height:800px;' />`;
yield container;
let map = new mapboxgl.Map({
container,
center: [-87.7627898, 37.397545],
zoom: 12,
style: "mapbox://styles/sinclarius/cjyfpabft0u8s1dpcfb99lion"
});
map.on("mousemove", e => {
container.value = e.lngLat;
container.dispatchEvent(new CustomEvent("input"));
});
map.on('load', function () {
var layers = map.getStyle().layers;
var firstSymbolId;
for (var i = 0; i < layers.length; i++) {
if (layers[i].type === 'symbol') {
firstSymbolId = layers[i].id;
break;
}
}
map.addLayer({
'id': 'building-fill',
'type': 'fill',
"source": {
type: 'vector',
url: 'mapbox://sinclarius.85till2b'
},
'source-layer': 'buildings',
'layout': {
},
'paint': {
'fill-color': '#e39f91',
'fill-opacity': 1
}
}, firstSymbolId)});
}