Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Maplibre Native Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-maplibre-native-knowledge-patch)
---
name: maplibre-native-knowledge-patch
description: MapLibre Native
version: null
license: MIT
metadata:
author: Nevaberry
---
# MapLibre Native compatibility guidance
Load this skill when upgrading or integrating MapLibre Native, authoring shared
styles, working with native rendering and offline data, or using Node and Qt
bindings. Use the topic references for API details, examples, and platform-specific
behavior.
## Reference index
| Reference | Topics |
| --- | --- |
| [Android](references/android.md) | Artifacts, migrations, GeoJSON updates, assets, offline regions, camera, Vulkan, diagnostics |
| [iOS and Darwin](references/ios.md) | Frameworks, style lifecycle, camera, offline storage, custom drawing, observers |
| [Architecture and rendering](references/architecture-and-rendering.md) | C++ migration, builds, backends, threading, plug-in API, resource requests, rendering statistics |
| [Desktop bindings](references/desktop-bindings.md) | Node runtimes and rendering, resource callbacks, Qt integration, Linux tools |
| [Style and interoperability](references/style-and-interop.md) | SDK compatibility, state, expressions, layers, fonts, source updates, typed iOS properties |
## Breaking changes and deprecations
### Android integration
- Android 12.0.0 raises the minimum SDK from API 21 to API 23. Set the app's
`minSdk` to at least `23` before upgrading.
- Starting in Android 13.0.0, `org.maplibre.gl:android-sdk` uses Vulkan.
To retain OpenGL ES, depend on `android-sdk-opengl`.
- Android 13.0.0 replaces separate synchronous GeoJSON update methods with
a source-level option; see the GeoJSON quick reference below.
- Starting in Android 13.5.1, the AAR's Prefab package supplies headers only.
Native builds that obtained a binary through Prefab need to link it separately.
- Android 13.4.0 narrows the SDK's enum ProGuard keep rule. If app code relied on
it for reflected enums, add app keep rules for those enums.
- The core `org.maplibre.android.annotations` API has been deprecated since
7.0.0; the API reference directs new annotation code to the Android Annotation
Plugin.
- `org.maplibre.android.http` is reserved for SDK-internal use. The modular HTTP
API is under `org.maplibre.android.module.http`.
### iOS integration
- Set the app's deployment target to iOS 15.5 or later for iOS SDK 7.0.0.
- In iOS 7.0.0, replace Objective-C imports of `Mapbox.h` with `MapLibre.h`;
Swift uses `import MapLibre`. Read `CFBundleShortVersionString` from the
framework bundle for the SDK version at runtime.
- iOS 7.0.0 packages device and simulator debug symbols in the dynamic
XCFramework. Update upload jobs that fetched the former standalone ZIP.
- iOS 6.31.0 removes `CustomDrawableLayer`. Apps using it need to update their
custom layer code before upgrading.
- iOS 6.30.0 renames the `OpenGL` event to `GraphicsBackend`; update matching
event filters.
- Starting in iOS 6.26.1, Apple builds hide vendored HarfBuzz symbols. Apps that
call HarfBuzz directly need to link HarfBuzz themselves.
### Native C++ integration
Use `mln::` instead of `mbgl::` when building against Android 13.5.1 or
iOS 6.29.0. Update core include paths from `mbgl/` to `mln/` when building
against Android 13.6.0 or iOS 6.29.0.
### Node and Qt integration
The stable `@maplibre/maplibre-gl-native` 6.4.1 package supports Node.js 20,
22, and 24. Node binding 6.5.0-pre.1 is a prerelease: it adds Node.js 26,
drops Node.js 20, and uses NAN 2.27.0. Node binding 5.0.0 removes the installer's
source-compilation fallback; installs on that release require a compatible
prebuilt binary.
Stable MapLibre Native Qt 3.0 requires OpenGL. Qt 4.0 requires Qt 6.5 or newer,
drops Qt 5 support, and has rendering backend changes that break 3.x
compatibility. Its development branch API may change before stable 4.0.
## Source updates and packaged tiles
### Synchronous GeoJSON updates
Android 11.11.0 exposes synchronous `GeoJsonSource` update methods. Android
13.0.0 replaces them with `withSynchronousUpdate(true)` on `GeoJsonOptions`
at construction, followed by regular source update methods:
```kotlin
val source = GeoJsonSource("my-source", GeoJsonOptions().withSynchronousUpdate(true))
```
Android 13.5.0 exposes `setOverrideSynchronousUpdate` for an existing source.
iOS 6.22.0 supports synchronous GeoJSON updates when subsequent code needs
to wait for the update to finish.
### PMTiles and Android assets
Android 11.8.0 and iOS 6.10.0 support PMTiles archives; iOS uses `pmtiles://`.
PMTiles metadata always reports XYZ starting in Android 11.8.8 and iOS 6.14.0.
Android 13.3.0 allows PMTiles sources to use the ambient cache.
On Android 13.7.1, place an archive in the APK's `assets/` directory:
```json
{
"type": "vector",
"url": "pmtiles://asset://offline/tiles.pmtiles"
}
```
Android 13.7.1 also accepts `file:///android_asset/styles/offline.json`,
including asset URIs returned by Compose Multiplatform's `Res.getUri()`.
### Style and tile changes
Loading style JSON cancels a pending style request in Android 12.3.0 and
iOS 6.22.0. On iOS, setting `MLNMapView.styleURL` replaces the style graph;
reinstall sources, style images, and layers in
`MLNMapViewDelegate.mapView(_:didFinishLoading:)` on each load.
Android 13.8.0 and iOS 7.1.0 display replacement images under the same name,
including with synchronous GeoJSON updates. They also pick up sources added
after a layer references them, and update the renderer when a source or style
image is removed without another style change.
## State, expressions, and layer styling
### Feature state and global state
Android 13.4.0 and iOS 6.30.0 expose feature state for styling individual
features without replacing source data.
Android 13.7.1 and iOS 7.0.0 support root `state` and `global-state`.
Android provides `setGlobalStateProperty()` and `getGlobalState()` on `Style`
and `MapSnapshotter`, plus `Expression.globalState()`. iOS provides
`-[MLNStyle setGlobalStateValue:forProperty:]` and `MLNStyle.globalState`.
Android layer visibility accepts `PropertyFactory.visibility(Expression)`;
read it with `Layer.getVisibilityExpression()`.
The shared-style reference preserves the style specification's support-column
statements separately from the release-specific SDK capabilities.
### Color, polygon, and line styling
- Android 13.7.1 and iOS 7.0.0 support `interpolate-lab` and `interpolate-hcl`.
On Android, use style JSON or pass the JSON expression to `Expression.raw()`.
- On Android 13.7.1 and iOS 7.0.0, an SDF `fill-pattern` can be tinted with
`fill-color`; Android supports data-driven tinting.
- Android 13.8.0 and iOS 7.1.0 add `fill-rounded-corner-distance` to `fill`
layers. It measures meters along each edge from the corner to the curve start.
- Android 13.7.1 and iOS 7.0.0 match MapLibre GL JS's `line-pattern` image
sizing. Recheck sprite dimensions if they compensated for prior enlargement
and stretching along the line.
- iOS 7.0.0 and Android 13.8.0 render dashed lines with the gradient when both
`line-gradient` and `line-dasharray` are set.
- In Android 13.8.0 and iOS 7.1.0, background, raster, hillshade, color-relief,
and custom layers are hidden at the exact upper zoom limit.
### Fonts and glyph requests
Android 11.13.0 and iOS 6.18.0 support `font-faces` with HarfBuzz shaping and
font fallback. Node supports the root property starting in 6.2.0. Supply a
`glyphs` URL for Native Android and iOS labels: selecting local fonts by omitting
the URL is documented as unsupported.
If a glyph range request fails, Android 13.8.0 and iOS 7.1.0 render with available
glyphs and retry the range when another tile needs it.
## Custom rendering and diagnostics
Android 13.7.1 and iOS 7.0.0 offer an **experimental** C API in `plugin_api.h`
for registering custom style layer types via `mln_plugin_register_v1`. On Android,
choose the matching artifact with `-with-plugin-api`; iOS uses the `MapLibre`
product from the separate `maplibre/maplibre-ios-with-plugin-api` Swift package.
See the architecture reference for exact Android artifact names.
The Android OpenGL render loop runs on a dedicated thread. For custom layers
drawing from Android view state, pass an immutable snapshot to the render thread.
Android 13.7.1 enables per-frame feature data through
`MapLibreMapOptions.featureInfoEnabled(true)`. Read
`RenderingStats.getRenderedFeatures()` in
`OnDidFinishRenderingFrameWithStatsListener`, or use
`MapLibreMap.getRenderedFeatureCount()` for counts. On iOS 7.0.0, set
`MLNMapOptions.featureInfoEnabled` and read `MLNRenderingStats.frameRenderedFeatures`.
Android 13.8.0 and iOS 7.1.0 disable symbol guard checks by default. Enable them
with `MLN_SYMBOL_GUARDS=1` before the first map loads.
Use Android SDK debug artifacts with a `-debug` suffix for diagnostic logs.
For native crash symbols in Android 13.6.0, match the archive to the SDK flavor
and build type, including release builds. Android 13.8.0 adds
`MapView.OnRenderErrorListener.onRenderError(String message)`; listeners
implementing only `onRenderError()` still receive callbacks.
## Offline data and rendering tools
Call Android `OfflineManager` on the UI thread and handle asynchronous results
in its main-thread callbacks. An inactive region can still serve downloaded
resources. `OfflineRegion.invalidate` revalidates with the server and can reuse
unchanged data; `OfflineRegion.delete` makes resources eligible for eviction.
After importing an iOS offline database from a file or URL, call `reloadPacks`
and use the refreshed `packs` collection. iOS 7.0.0 `invalidatePack` completes
after its database operation and propagates database errors. In iOS 7.1.0,
`source.isVolatile = true` keeps an `MLNSource`'s tiles out of the disk ambient cache.
Node `map.render` delivers raw four-channel pixels, defaulting to 512 × 512
at pixel ratio 1. `map.release()` ends rendering lifetime; the callback can
still use its pixel buffer. For individual tiles, use
`new mbgl.Map({ mode: "tile" })` so symbols match across tile boundaries.
The desktop reference includes Linux build commands, MBTiles rendering,
headless `xvfb-run -a` usage, render fixtures, and Qt deployment commands.
The architecture reference includes the Bazel iOS project-generation command,
offline Google Test dependency requirements, and external `wgpu` linking.