Platforms
This page describes the platforms that MapLibre Native is available on.
Overview
MapLibre Native uses a monorepo. Source code for all platforms lives in maplibre/maplibre-native
on GitHub.
Platform | Source | Notes |
---|---|---|
Android | platform/android | Integrates with the C++ core via JNI. |
iOS | platform/ios , platform/darwin | Integrates with the C++ core via Objective-C++. |
Linux | platform/linux | Used for development. Also widely used in production for raster tile generation. |
Windows | platform/windows | |
macOS | platform/macos , platform/darwin | Mainly used for development. There is some legacy AppKit code. |
Node.js | platform/node | Uses NAN. Available as @maplibre/maplibre-gl-native on npm. |
Qt | maplibre/maplibre-qt, platform/qt | Only platform that partially split to another repository. |
Of these, Android and iOS are considered core projects of the MapLibre Organization.
GLFW
You can find an app that uses GLFW in platform/glfw
. It works on macOS, Linux and Windows. The app shows an interactive map that can be interacted with. Since GLFW adds relatively little complexity this app is used a lot for development. You can also learn about the C++ API by studying the source code of the GLFW app.
Rendering Backends
Originally the project only supported OpenGL 2.0. In 2023, the renderer was modularized allowing for the implementation of alternate rendering backends. The first alternate rendering backend that was implemented was Metal, followed by Vulkan. In the future other rendering backends could be implemented such as WebGPU.
What platfroms support which rendering backend can be found below.
Platform | OpenGL ES 3.0 | Vulkan 1.0 | Metal |
---|---|---|---|
Android | ✅ | ✅ | ❌ |
iOS | ❌ | ❌ | ✅ |
Linux | ✅ | ✅ | ❌ |
Windows | ✅ | ❌ | ❌ |
macOS | ❌ | ✅ | ✅1 |
Node.js | ✅ | ❌ | ✅ 2 |
Qt | ✅ | ❌ | ❌ |
Requires MoltenVK. Only available when built via CMake.
Issue reported, see #2928.
Build Tooling
In 2023 we co-opted Bazel as a build tool (generator), mostly due to it having better support for iOS compared to CMake. Some platforms can use CMake as well as Bazel.
Platform | CMake | Bazel |
---|---|---|
Android | ✅ (via Gradle) | ❌ |
iOS | ❌ | ✅ |
Linux | ✅ | ✅ |
Windows | ✅ | ❌ |
macOS | ✅ | ✅ |
Node.js | ✅ | ❌ |
Qt | ✅ | ❌ |