observable-framework-lib-leaflet
Installation
SKILL.md
Library: Leaflet
Observable Framework documentation: Library: Leaflet Source: https://observablehq.com/framework/lib-leaflet
Leaflet is an “open-source JavaScript library for mobile-friendly interactive maps.” Leaflet is available by default as L in Observable markdown. You can import it explicitly like so:
import * as L from "npm:leaflet";
If you import Leaflet, Leaflet’s stylesheet will automatically be added to the page.
To create a map, follow the tutorial:
const div = display(document.createElement("div"));
div.style = "height: 400px;";