Public
Edited
Nov 17, 2023
2 forks
1 star
Insert cell
Insert cell
{
let container = html`<div style='height:800px;' />`;
yield container;
let map = new mapboxgl.Map({
container,
center: [23.49, 2.763],
zoom: 2,
style: "mapbox://styles/plotline/cloer6d1q003k01qjgbbo1f4z"
});
invalidation.then(() => map.remove());
}
Insert cell
mapboxgl = {
const gl = await require("mapbox-gl@v3.0.0-rc.1");
if (!gl.accessToken) {
gl.accessToken =
"pk.eyJ1IjoicGxvdGxpbmUiLCJhIjoiY2xsd240Nm4yMTM1YzNpbzk2NTdlOG5nNCJ9.Q-WrwJMc3xLckKKdEfX85g";
const href = await require.resolve(
"mapbox-gl@v3.0.0-rc.1/dist/mapbox-gl.css"
);
document.head.appendChild(html`<link href=${href} rel=stylesheet>`);
}
return gl;
}
// https://api.mapbox.com/mapbox-gl-js/v3.0.0-rc.1/mapbox-gl.js
// https://api.mapbox.com/mapbox-gl-js/v3.0.0-rc.1/mapbox-gl.css
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more