Reference
Interactive maps
import { … } from "@johnmorrisdotca/chizu/mount";
17.0 kB minified and gzipped, with everything it imports (measured with esbuild)
Chizu in a page: mountChizu draws a map into any element and lets a person look around it by touch, mouse and
keyboard: drag to move, the buttons, wheel or a pinch to zoom in ten steps, a press to choose a region. The world pans
round without stopping. A separate entry (@johnmorrisdotca/chizu/mount), so a server never loads any of it.
Exports
| Name | Kind | What it is |
|---|---|---|
CHIZU_MAP_STYLE | constant | THE STYLE a mounted map wears, beside the drawing's own (CHIZU_STYLE): the frame the map sits in, the zoom buttons over its corner and the line a screen reader is told what was chosen on. |
ChizuMount | type | The mounted native map’s drawing updates, selected region, framing, loaded features and cleanup handle. |
ChizuMountOptions | type | What a mounted map is told. |
ChizuView | type | Where a mounted map is looking. |
ensureChizuMapStyle | function | Put the style in the page once: in the document's head, or in the shadow root the host is in. |
mountChizu | function | Puts a map in an element, to look at by touch, mouse and keyboard: drag to move it, the buttons, the wheel or a pinch to zoom in ten steps, a press to choose a region, the arrow keys and plus and minus. |