Public
Edited
Oct 26, 2022
Importers
1 star
Insert cell
Insert cell
viewof map = makeMap({center:[-79.4,43.7], zoom:3})
Insert cell
function* makeMap({
w=300,h=250,
center=[-4.5,54.5],
zoom=3.5,
style="mapbox://styles/mapbox/light-v9",
scrollZoom=true,
}={}) {
const container = html`<div style="height:${h}px; width:${w}px">`;
yield container;
const map = container.value = new mapboxgl.Map({
container,
center,
zoom,
style,
scrollZoom
});
invalidation.then(() => map.remove());
}
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more