Public
Edited
Jun 10, 2022
1 fork
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mapboxgl = {
const gl = await require("mapbox-gl");
if (!gl.accessToken) {
gl.accessToken = mapBoxApiKey;
const href = await require.resolve("mapbox-gl/dist/mapbox-gl.css");
document.head.appendChild(html`<link href=${href} rel=stylesheet>`);
}
return gl;
}
Insert cell
MapboxGeocoder = {
const geocoder = require("https://bundle.run/@mapbox/mapbox-gl-geocoder@4.7.4");
const href = await require.resolve(
"@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css"
);
document.head.appendChild(html`<link href=${href} rel=stylesheet>`);
return geocoder;
}
Insert cell
MapboxDraw = {
const draw = require("@mapbox/mapbox-gl-draw@1.3.0/dist/mapbox-gl-draw.js");
const href = await require.resolve(
"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.2.0/mapbox-gl-draw.css"
);
document.head.appendChild(html`<link href=${href} rel=stylesheet>`);
return draw;
}
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