maplibre-fonts-glyphs
Configuring fonts and glyphs for MapLibre GL JS and MapLibre Native — the style's `glyphs` URL, self-hosting or generating font…
Cartographic principles for MapLibre GL JS — label and symbol legibility on imagery vs. vector basemaps, figure-ground for point icons, styling vector roads over aerial imagery, visual hierarchy, layer ordering for data injection, and accessibility. Use when styling a map,
$ npx -y skills add maplibre/maplibre-agent-skills --skill maplibre-cartography --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/maplibre-cartographyContext preview
The summary Claude sees to decide when to auto-load this skill.
Cartographic principles for MapLibre GL JS — label and symbol legibility on imagery vs. vector basemaps, figure-ground for point icons, styling vector roads over aerial imagery, visual hierarchy, layer ordering for data injection, and accessibility. Use when styling a map,
name: maplibre-cartography description: Cartographic principles for MapLibre GL JS — label and symbol legibility on imagery vs. vector basemaps, figure-ground for point icons, styling vector roads over aerial imagery, visual hierarchy, layer ordering for data injection, and accessibility. Use when styling a map, choosing text or symbol colors, making markers or roads readable on satellite/aerial imagery, or ordering layers correctly. status: verified
MapLibre renders exactly what you describe in your style. This skill covers how to describe it well: choosing label colors for readability on any basemap, building a coherent visual hierarchy, and ordering style layers correctly. For font/glyph setup, see [maplibre-fonts-glyphs](../maplibre-fonts-glyphs/SKILL.md); for sprites, icon sourcing, and route shields, see [maplibre-sprites-icons](../maplibre-sprites-icons/SKILL.md).
MapLibre places labels dynamically, so you cannot mask the background behind each label as you would on a static map. Instead, choose a `text-halo-color` that separates the label from every background it might land on, and a `text-color` that reads against the halo. On a single uniform basemap tone (flat light or dark vector), the halo can match that tone instead of contrasting it — the text itself does the contrasting against the basemap. Imagery has no single tone to match, so there the halo must contrast every possible background instead:
| Basemap type | Background | Recommended text color | Recommended halo | | ---------------------------------------------- | ---------------------------------------------------------- | ------------------------------- | ------------------------------------------------ | | Light vector (streets, OpenFreeMap positron) | Pale/white | Dark (`#333` or similar) | Light semi-transparent (`rgba(255,255,255,0.8)`) | | Dark vector (dark-matter, navigation night) | Dark | White or near-white (`#ffffff`) | Dark semi-transparent (`rgba(0,0,0,0.75)`) | | Satellite or aerial imagery (NAIP, Sentinel-2) | Unpredictable — bright crops, dark forests, urban rooftops | White (`#ffffff`) | **Dark semi-transparent (`rgba(0,0,0,0.75)`)** |
The most common mistake is a white halo with no transparency: unless the background is pure white, it disrupts the spatial connection between the label and the feature it labels — add transparency. The second is reusing a light-vector palette over imagery, where it fails on dark terrain, forests, and water. **On imagery, always use white text and a dark semi-transparent halo** (`"text-color": "#ffffff"`, `"text-halo-color": "rgba(0,0,0,0.75)"`, `"text-halo-width": 1.2`).
For tinted labels (parks, water, POIs), use a light tint of the semantic color (`#c8f5cc` parks, `#a8d8ff` water) rather than the dark saturated version: tints read against dark halos while keeping semantic meaning, where full-saturation colors contrast poorly at small sizes.
Wider halos increase legibility but add visual weight. Typical values:
| Context | `text-halo-width` | | ------------------------------------- | ----------------- | | Body labels (city, town, village) | 0.8–1.5 | | Country / continent (large text) | 1.5–2.0 | | Small POI or peak labels | 0.8–1.2 | | Water / park labels with colored text | 1.0–1.5 |
`text-halo-width` is in pixels relative to the text. The halo must not bleed into adjacent labels: keep it tight at small text sizes and add transparency.
Markers face the same figure-ground problem as labels, but with different tools. A colored icon on aerial imagery competes with an unpredictable, busy, _desaturated_ photographic background.
Curated guidance for AI assistants building MapLibre applications — covering ecosystem and open-source best practices. Agent skills are markdown files that AI coding assistants read as context.
Configuring fonts and glyphs for MapLibre GL JS and MapLibre Native — the style's `glyphs` URL, self-hosting or generating font…
Migrating from Mapbox GL JS to MapLibre GL JS — package and import changes, removing the access token, choosing tile sources,…
Serverless vector and raster tiles with PMTiles for MapLibre GL JS — single-file format, HTTP range requests, hosting on…
The step-by-step procedure for running this repo's Promptfoo evals with a generator and a judge over provider APIs. Use when…
How to turn a working session into a MapLibre agent skill — you researched something MapLibre's docs did not cover, got it wrong…
Getting a MapLibre GL JS source to actually render — TileJSON `url` versus hand-wired `tiles` templates, matching `source-layer`…