Skip to content
Back to skills

Maplibre Native Knowledge Patch

ASecurity

MapLibre Native

  • 25 stars
  • 0 votes
  • 0 copies
  • 16 views
  • Added September 5, 2026
developmentgoswiftkotlinc++nodeexpressawstestinggitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill maplibre-native-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Maplibre Native Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Maplibre Native Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-maplibre-native-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-maplibre-native-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: maplibre-native-knowledge-patch
description: MapLibre Native
version: null
license: MIT
metadata:
  author: Nevaberry
---


# MapLibre Native compatibility guidance

Load this skill when upgrading SDK dependencies, selecting graphics backends,
integrating custom layers, authoring shared styles, or diagnosing resources and
rendering. The references contain the detailed API guidance, examples, and
platform-specific conditions for these tasks.

## Reference index

| Reference | Topics |
| --- | --- |
| [Android SDK](references/android.md) | Upgrade requirements, artifacts, GeoJSON synchronization, gestures, location, snapshots, HTTP, offline storage |
| [Architecture and Rendering](references/architecture-and-rendering.md) | C++ migration, graphics backends, plug-in APIs, observers, frame data, camera rendering, source builds, backports |
| [iOS and Darwin SDK](references/ios-and-darwin.md) | Deployment, framework packaging, custom drawing, typed styles, camera controls, networking, offline packs |
| [Linux Build and Rendering Tests](references/linux-build-and-testing.md) | Build dependencies, local MBTiles, headless rendering, fixtures and render-test output |
| [Node and Qt Bindings](references/node-and-qt.md) | Runtime compatibility, package installation, pixels, resource callbacks, QML, CMake and deployment |
| [Styles, Sources, and Interoperability](references/styles-and-interoperability.md) | Support tables, global state, archives, source validation, expressions, patterns, fonts and glyphs |

## Breaking changes and deprecations

### Android dependencies and native integration

Android 12.0.0 raises the minimum SDK from API 21 to API 23; set the application's
`minSdk` to at least `23` before upgrading. Starting in Android 13.0.0,
`org.maplibre.gl:android-sdk` uses Vulkan. Depend on `android-sdk-opengl` to keep
OpenGL ES. The `multiBackend` flavor enables runtime OpenGL/Vulkan selection.

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 ProGuard enum keep rule; add app keep rules for
reflected enums if the app relied on the previous rule.

The core `org.maplibre.android.annotations` API has been deprecated since 7.0.0,
including `Marker`, `Polyline`, `Polygon`, `MarkerOptions`, and `IconFactory`.
The API reference directs new annotation code to the Android Annotation Plugin.
The `org.maplibre.android.http` package is SDK-internal; the modular HTTP API is
under `org.maplibre.android.module.http`.

### Core namespace and headers

Use `mln::` instead of `mbgl::` against Android 13.5.1 or iOS 6.29.0.
Change core include paths from `mbgl/` to `mln/` against Android 13.6.0 or
iOS 6.29.0. See the architecture reference for C++ linkage and dependency details.

### iOS deployment, imports, and custom drawing

For iOS SDK 7.0.0, set the app's minimum deployment target to iOS 15.5 or later.
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.

In iOS 7.0.0, device and simulator debug symbols come from the dynamic
XCFramework. Update symbol upload jobs that fetched the former standalone ZIP.
Apple builds hide vendored HarfBuzz symbols starting in iOS 6.26.1; apps calling
HarfBuzz directly need to link it themselves.

iOS 6.31.0 removes `CustomDrawableLayer`; apps using it need to update custom
layer code before upgrading. iOS 6.30.0 renames the `OpenGL` event to
`GraphicsBackend`, so update event filters matching the old name.

### Node and Qt compatibility

The stable Node package 6.4.1 supports Node.js 20, 22, and 24. The 6.5.0-pre.1
prerelease adds Node.js 26, drops Node.js 20, and uses NAN 2.27.0.
For reproducing the Node 6.3.0 package build, use `@acalcutt/node-pre-gyp`.
Node binding 5.0.0 removes the installer's source-compilation fallback;
installs on that release require a compatible prebuilt binary.

MapLibre Native Qt 4.0 requires Qt 6.5 or newer and drops Qt 5 support.
Its renderer changes break compatibility with 3.x, and the development branch
API may change before stable 4.0. Stable Qt 3.0 requires OpenGL.

## Source updates and style lifecycle

Android 13.0.0 replaces separate synchronous GeoJSON update methods with a
source option: enable `withSynchronousUpdate(true)` on the constructor's
`GeoJsonOptions`, then use regular source update methods.

```kotlin
val source = GeoJsonSource("my-source", GeoJsonOptions().withSynchronousUpdate(true))
```

Android 13.5.0 exposes `setOverrideSynchronousUpdate` for existing sources.
iOS 6.22.0 supports synchronous GeoJSON updates when subsequent code needs to
wait for completion. Loading style JSON cancels pending style requests starting
in Android 12.3.0 and iOS 6.22.0.

Setting `MLNMapView.styleURL` replaces the style graph. Reinstall runtime
sources, style images, and layers in `MLNMapViewDelegate.mapView(_:didFinishLoading:)`
on each load. Annotations belong to the map view and follow its overlay lifecycle.

Android 13.8.0 and iOS 7.1.0 display replacement images under the same name,
including with synchronous GeoJSON updates. They pick up sources added after a
layer references them; source or image removal also triggers a renderer update.

## Global state and shared style expressions

Android 13.7.1 and iOS 7.0.0 support root `state` and the `global-state`
expression. Android exposes `setGlobalStateProperty()` and `getGlobalState()`
on `Style` and `MapSnapshotter`, plus `Expression.globalState()`.
iOS exposes `-[MLNStyle setGlobalStateValue:forProperty:]` and `MLNStyle.globalState`.

On Android, use `PropertyFactory.visibility(Expression)` to set expression-based
visibility and `Layer.getVisibilityExpression()` to read it. The styles reference
keeps the documented SDK support-table status alongside version-specific support.

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()`.
Styles using `semiliteral` require iOS 6.31.0 or later on iOS.
Use iOS 6.29.0 or later for `split`, `join`, Unicode string expression behavior,
or alpha in HSL colors.

## Archive sources and local resources

PMTiles is supported by Android, iOS, and Node. iOS supports the `pmtiles://`
scheme; on Android 13.7.1, archives in the APK's `assets/` directory can use
`pmtiles://asset://` source URLs. Android 13.7.1 also accepts APK asset URIs such
as `file:///android_asset/styles/offline.json`, including those from `Res.getUri()`.

Android 13.8.0 lets inline `minzoom` and `maxzoom` override TileJSON values for
`raster` or `raster-dem` sources with a `url`. Invalid zoom bounds reject the
source, as does invalid `raster-dem` `encoding`.

Android 13.8.0 and iOS 7.1.0 preserve a percent sign not followed by two hex
digits in `file://` and `mbtiles://` URLs; Android also does so for `asset://`.
They retry rate-limited requests immediately when `Retry-After` or
`X-RateLimit-Reset` specifies a time that has already passed.

## Layer appearance and text

Android 13.8.0 and iOS 7.1.0 add `fill-rounded-corner-distance` on `fill` layers.
Its distance is measured in meters along each edge from the corner to the curve's
start. These releases hide background, raster, hillshade, color-relief, and
custom layers at their exact upper zoom limit.

Android 13.7.1 and iOS 7.0.0 match MapLibre GL JS's `line-pattern` image sizing.
Recheck sprite dimensions if you compensated for prior enlargement and stretching.
Dashed lines render their `line-gradient` on iOS 7.0.0 and Android 13.8.0.

Supply a `glyphs` URL for Native Android and iOS labels: selecting local fonts by
omitting it is documented as unsupported. If a glyph range fails in Android
13.8.0 or iOS 7.1.0, the tile renders with available glyphs; the range is retried
when another tile needs it. See the styles reference for `font-faces` support,
CJK label behavior, sprite properties, and color serialization.

## Custom rendering and diagnostics

Android 13.7.1 and iOS 7.0.0 offer an experimental C API in `plugin_api.h`, using
`mln_plugin_register_v1` to register custom style layer types. Android uses
renderer-specific artifacts with the plug-in API; iOS uses the `MapLibre` product
from the separate `maplibre/maplibre-ios-with-plugin-api` Swift package.

The Android OpenGL render loop runs on a dedicated thread. If a custom layer
draws state owned by the Android view, pass an immutable snapshot to that thread.
Use a rendering observer for frame-loop events; map observers receive style
loading, idle, camera, and map-level render lifecycle events.

For per-frame feature data on Android 13.7.1, enable
`MapLibreMapOptions.featureInfoEnabled(true)` and read
`RenderingStats.getRenderedFeatures()` in `OnDidFinishRenderingFrameWithStatsListener`.
On iOS 7.0.0, set `MLNMapOptions.featureInfoEnabled` and read
`MLNRenderingStats.frameRenderedFeatures`. The architecture reference includes
feature-count APIs, action journals, and symbol preparation behavior.

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. On Android 13.8.0,
`MapView.OnRenderErrorListener.onRenderError(String message)` receives error text;
listeners implementing only `onRenderError()` still receive callbacks.

## Offline storage, server rendering, and builds

Call Android `OfflineManager` on the UI thread; its asynchronous results arrive
in main-thread callbacks. An inactive region can still serve downloaded data.
`OfflineRegion.invalidate` revalidates and can reuse unchanged data;
`OfflineRegion.delete` makes the region's resources eligible for eviction.

On iOS, call `reloadPacks` after importing an offline database, then use the
refreshed `packs` collection. In iOS 7.1.0, `source.isVolatile = true` on an
`MLNSource` keeps its tiles out of the on-disk ambient cache.
Android `clearAmbientCache` and iOS `clearAmbientCacheWithCompletionHandler:`
preserve resources required by explicit offline regions or packs.

Node `map.render` delivers raw four-channel pixels, defaulting to 512 × 512 at
pixel ratio 1. Its callback can use the pixel buffer after `map.release()`.
Use `new mbgl.Map({ mode: "tile" })` for matching symbols across tile boundaries;
the default mode is `"static"`. A custom `request(req, callback)` must support
the style's URL schemes and return uncompressed bytes.

The Linux reference contains the OpenGL build, local MBTiles rendering, and
fixture commands. If headless rendering reports `Failed to open X display.`,
install `xvfb` and `xauth` and launch with `xvfb-run -a`.
The architecture reference contains iOS Xcode project generation, Bazel's
Google Test cache dependency, external `wgpu` linking, and backport procedure.

Files in this skill

  • SKILL.md10.2 KB
  • coverage.json2 KB
  • references/android.md5.1 KB
  • references/architecture-and-rendering.md6.2 KB
  • references/ios-and-darwin.md6.8 KB
  • references/linux-build-and-testing.md2.2 KB
  • references/node-and-qt.md5 KB
  • references/styles-and-interoperability.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.