observable-framework-lib-mapbox-gl

Installation
SKILL.md

Library: Mapbox GL JS

Observable Framework documentation: Library: Mapbox GL JS Source: https://observablehq.com/framework/lib-mapbox-gl

Mapbox GL JS is a library for building web maps and web applications with Mapbox’s modern mapping technology. Mapbox GL JS is available by default as mapboxgl in Markdown, but you can import it explicitly like so:

import mapboxgl from "npm:mapbox-gl";

If you import Mapbox GL JS, its stylesheet will automatically be added to the page.

To create a map, create a container element with the desired dimensions, then call the Map constructor:

const div = display(document.createElement("div"));
div.style = "height: 400px;";
Related skills
Installs
4
First Seen
Feb 28, 2026