---
name: maptiler
description: >-
Expert coding skill for the full MapTiler platform — Cloud REST APIs, MapTiler
SDK JS (built on MapLibre GL JS), native mobile SDKs, on-premise infrastructure,
and vector tile schemas. USE WHEN the user wants to add a map to a web or mobile
app, show locations or routes, display geographic data, build a store locator,
create data visualizations on maps, add geocoding or address search, do reverse
geocoding, look up elevation, do IP geolocation, fetch weather data, transform
coordinates between CRS/EPSG, embed static map images, work with vector tilesets
(Planet v4, Buildings, Contours, Outdoor, Ocean, Landcover, Cadastre), write
MapLibre style expressions or data-driven styling, render 3D terrain, globe view,
or 3D buildings extrusion, use satellite imagery, add markers, popups, heatmaps,
or clustering, integrate maps in React, Vue, Svelte, Angular, Next.js, Leaflet,
OpenLayers, Cesium, or deck.gl, build native maps on iOS (Swift), Android (Kotlin),
Flutter, or React Native, self-host with MapTiler Server or generate tiles with
MapTiler Engine CLI, or upload/manage tilesets via the Admin API. Also USE WHEN
the user mentions MapLibre GL JS — the SDK extends MapLibre with built-in cloud
services, helpers, and session billing.
---
# MapTiler — Agent Skill
> [@maptiler/sdk](https://www.npmjs.com/package/@maptiler/sdk) · [Docs](https://docs.maptiler.com/) · [Cloud Console](https://cloud.maptiler.com/) · [GitHub](https://github.com/maptiler)
Covers every MapTiler product surface: web SDK, framework integrations, native mobile SDKs, Cloud REST APIs, on-premise Server / Engine, and vector tile schemas. Reference docs live under `references/` and are loaded on demand. Use [references/INDEX.md](references/INDEX.md) as the curated catalog.
---
## 1. Platform Coverage & File Prefix Conventions
Target your `grep` / glob searches in `references/` using these prefix filters to avoid cross-platform contamination:
| Target Platform | File Name Prefix |
| :--- | :--- |
| **Web** (Core JS SDK) | `sdk-js-*`, `examples-sdk-js-*` |
| **Web Frameworks** (React, Svelte, Vue, Angular) | `web-libraries-*`, `examples-react-*`, `examples-svelte-*`, `examples-vuejs-*`, `examples-angular-*` |
| **Web Mapping Engines** (Leaflet, OpenLayers, Cesium, deck.gl) | `examples-leaflet-*`, `examples-openlayers-*`, `examples-cesium-*`, `web-libraries-deck-gl*` |
| **Android** (Kotlin/Java) | `mobile-sdks-android-*`, `examples-android-*` |
| **iOS** (Swift) | `mobile-sdks-ios-*`, `examples-ios-*` |
| **Cross-Platform Mobile** (Flutter, React Native) | `mobile-sdks-flutter-*`, `mobile-sdks-react-native-*` |
| **Cloud REST APIs** | `cloud-api-*`, `cloud-admin-api-*` |
| **On-Premise Infrastructure** | `on-prem-*` |
| **Vector Tile Schemas** | `map-resources-schemas-*` |
| **MapLibre Style Spec** | `map-resources-specifications-*` |
---
## 2. Universal Rules (apply across every platform)
### A. Zero Variable Leak Policy
Consult [references/versions.md](references/versions.md) and substitute all template placeholders (e.g. `{{site.versions.sdk}}`, `{{site.url}}`) with literal version strings or absolute paths before output. **NEVER emit raw `{{` or `}}` in any response.**
### B. Style Modernization (v2/v3 → v4)
Always upgrade legacy map styles. This applies to web, mobile, fallback XYZ layers, service-worker cache lists, and style-switcher logic.
| Legacy | Modern Replacement | SDK Constant |
| :--- | :--- | :--- |
| `basic-v2` / `streets-v2-light` | `base-v4` | `MapStyle.BASE` |
| `basic-v2-dark` | `base-v4-dark` | `MapStyle.BASE.DARK` |
| `streets-v2` | `streets-v4` | `MapStyle.STREETS` |
| `outdoor-v2` | `outdoor-v4` | `MapStyle.OUTDOOR` |
| `satellite` / `satellite-v2` | `satellite-v4` | `MapStyle.SATELLITE` |
| `hybrid` | `hybrid-v4` | `MapStyle.HYBRID` |
| `dataviz-dark` | `dataviz-v4-dark` | `MapStyle.DATAVIZ.DARK` |
| `topo-v2` | `topo-v4` | `MapStyle.TOPO` |
**Never** emit URLs or constants from the deprecated families: `streets-v2`, `streets-v2-dark/light`, `basic-v2*`, `outdoor-v2*`, `satellite-v2`, `hybrid-v2`, `dataviz-dark`, `topo-v2`.
**This rule applies to every context** that names a style or tile path:
- **Mobile style endpoints** (iOS / Android / Flutter / RN raw `style.json` URLs): `https://api.maptiler.com/maps/streets-v4-dark/style.json?key=YOUR_KEY`
- **Self-hosted / on-prem fallback XYZ layers and service-worker precache lists**: `/tiles/streets-v4/{z}/{x}/{y}.pbf` — never `/tiles/streets-v2/`
- **Style-switcher UI state** (dark/light toggles, swipe layers, diurnal style shifts): toggle exclusively between modern v4 IDs
### C. Pinned Versions
All SDK, CDN, and dependency versions live in [references/versions.md](references/versions.md). Read it before emitting any `package.json`, `
```
Other commonly-used pins:
- **Leaflet plugin**: `https://cdn.maptiler.com/maptiler-leaflet-maptilersdk/v4.1.0/maptiler-leaflet-maptilersdk.js`
- **ol-mapbox-style**: `https://cdn.jsdelivr.net/npm/ol-mapbox-style@13.4.1/dist/olms.js`
- **CesiumJS**: `1.141.0` (script + `/Widgets/widgets.css`)
**Browser ESM**: when using `