MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms. https://maplibre.org
  • C++ 53.9%
  • Kotlin 11.7%
  • Java 11.3%
  • Objective-C++ 9.5%
  • Objective-C 6.1%
  • Other 7.2%
Find a file
Tim Sylvester 2b92899710
Add Vanishing Route Demo to Android Test App (#4740)
Co-authored-by: Adrian Cojocaru <adrian.cojocaru92@yahoo.com>
2026-10-13 20:06:01 +00:00
.aspect/rules/external_repository_action_cache Use ESM in Node.js code generation scripts (#2739) 2024-08-23 14:31:36 +02:00
.github ci: request a 4 hour AWS session for sccache (#4764) 2026-10-13 15:01:00 +00:00
.well-known Update funding-manifest-urls URL to remove www prefix (#3997) 2025-12-09 17:47:08 +01:00
bazel core: add first version of C plugin API with ngon layer as example (#4612) 2026-09-18 19:03:52 +02:00
benchmark core/ios: require 15.5 and remove obsolete compatibility code (#4656) 2026-09-19 17:56:13 +02:00
bin mbgl-render add support for style from stdin and png to stdout (#4561) 2026-09-05 23:05:39 +00:00
cmake core: add first version of C plugin API with ngon layer as example (#4612) 2026-09-18 19:03:52 +02:00
design-proposals core: rename mbgl directories to mln (#4511) 2026-08-22 20:50:14 +02:00
docker fix: typos (#4202) 2026-07-13 15:08:27 +00:00
docs build: add Nix flake with Linux and Android dev shells (#4729) 2026-10-08 21:10:19 +02:00
expression-test core: rename mbgl directories to mln (#4511) 2026-08-22 20:50:14 +02:00
include/mln fix(core): handle platform locale expression failures (#4745) 2026-10-12 15:27:03 +02:00
metrics fix(core): size line patterns like GL JS (#4726) 2026-10-08 17:15:31 +02:00
misc Update Linux docs, add to Developer Documentation (#3451) 2025-05-13 14:09:43 +02:00
platform Add Vanishing Route Demo to Android Test App (#4740) 2026-10-13 20:06:01 +00:00
plugins android: enable native plugins in pre-releases and add demo (#4653) 2026-09-29 14:56:32 +02:00
render-test feat(core): js-parity global-state expression support (#4516) 2026-09-29 14:53:01 +02:00
rustutils build(ios): bundle XCFramework debug symbols and update Bazel dependencies (#4698) 2026-10-05 21:26:39 +02:00
scripts ios: remove Mapbox.h (#4731) 2026-10-11 07:07:25 +02:00
shaders fix(core): size line patterns like GL JS (#4726) 2026-10-08 17:15:31 +02:00
src/mln fix(core): maintain renderer frame and draw statistics (#4719) 2026-10-13 13:07:09 +00:00
test fix(core): maintain renderer frame and draw statistics (#4719) 2026-10-13 13:07:09 +00:00
vendor core/ios: require 15.5 and remove obsolete compatibility code (#4656) 2026-09-19 17:56:13 +02:00
.bazelignore core: Add HarmonyOS platform (#4315) 2026-09-19 02:44:42 +00:00
.bazelrc build(ios): bundle XCFramework debug symbols and update Bazel dependencies (#4698) 2026-10-05 21:26:39 +02:00
.bazelversion ci(ios): downgrade Bazel to 8.6.0 and revert #4733 (#4739) 2026-10-09 10:16:19 +02:00
.clang-format ios: apply clang-format to Objective-C++ sources (#4060) 2026-02-24 13:37:35 +00:00
.clang-tidy update linux-ci to Ubuntu 24.04, apply clang-tidy fixes (#3998) 2025-12-11 21:56:24 +01:00
.gitattributes Add Windows to CI tests (#2968) 2024-12-01 00:21:25 +01:00
.gitignore Ignore generated expression and render test reports (#4607) 2026-09-10 08:39:58 -07:00
.gitmodules core/ios: require 15.5 and remove obsolete compatibility code (#4656) 2026-09-19 17:56:13 +02:00
.npmignore Feature - Bring back node support (#217) 2022-02-08 20:40:19 +01:00
.nvmrc Add script for validating PR title (#4050) 2026-01-14 18:54:02 +01:00
.pre-commit-config.yaml Run iOS CI on GitHub-hosted macOS (#4359) 2026-06-24 03:03:38 +00:00
ARCHITECTURE.md core: rename mbgl directories to mln (#4511) 2026-08-22 20:50:14 +02:00
BUILD.bazel build(ios): bundle XCFramework debug symbols and update Bazel dependencies (#4698) 2026-10-05 21:26:39 +02:00
CHANGELOG.md Fix crash in RenderImageSource::update with an empty tile cover (#4753) 2026-10-12 15:18:17 +02:00
CMakeLists.txt fix(macos): align deployment targets on 14.3 (#4661) 2026-09-19 22:08:06 +00:00
CMakePresets.json ci(windows): update vcpkg and fix the arm64 build on the Visual Studio 2026 runner image (#4693) 2026-09-29 11:55:08 +02:00
CODE-OF-CONDUCT.md Update CODE-OF-CONDUCT.md (#385) 2022-08-10 23:41:03 -04:00
codecov.yml [general] moving ios and android project under ./platform folder 2020-12-20 12:38:56 +01:00
CONTRIBUTING.md Link AI Policy from CONTRIBUTING.md (#4249) 2026-04-22 09:07:56 -07:00
flake.lock build: add Nix flake with Linux and Android dev shells (#4729) 2026-10-08 21:10:19 +02:00
flake.nix build: add Nix flake with Linux and Android dev shells (#4729) 2026-10-08 21:10:19 +02:00
FORK.md Fix trailing whitespaces (#3205) 2025-02-09 03:33:24 +00:00
LICENSE.md Copyright to MapLibre contributors (#48) 2021-03-12 13:59:33 +01:00
LICENSES.core.md Update licenses (#3991) 2025-12-09 11:04:01 +00:00
MODULE.bazel ios: remove Mapbox.h (#4731) 2026-10-11 07:07:25 +02:00
package-lock.json chore: update dependencies to resolve security alerts (#4630) 2026-09-14 16:36:53 +00:00
package.json Bump simple-git from 3.33.0 to 3.36.0 (#4293) 2026-05-15 00:19:08 +00:00
pnpm-lock.yaml chore: update dependencies to resolve security alerts (#4630) 2026-09-14 16:36:53 +00:00
qt_attribution.json Update remaining MapLibre GL to MapLibre Native (#1216) 2023-06-07 17:40:54 +02:00
README.md Logo update in sponsorship section (#4645) 2026-09-18 10:16:23 +02:00
SECURITY.md Fix trailing whitespaces (#3205) 2025-02-09 03:33:24 +00:00
tsconfig.json Add script for validating PR title (#4050) 2026-01-14 18:54:02 +01:00

MapLibre Logo MapLibre Logo

MapLibre Native

codecov

MapLibre Native is a free and open-source library for publishing maps in your apps and desktop applications on various platforms. Fast displaying of maps is possible thanks to GPU-accelerated vector tile rendering.

This project originated as a fork of Mapbox GL Native, before their switch to a non-OSS license in December 2020. For more information, see: FORK.md.

Android device with MapLibre iOS device with MapLibre

Getting Started

Android

Add the latest version of MapLibre Native Android as a dependency to your project.

    dependencies {
        ...
        implementation 'org.maplibre.gl:android-sdk:11.11.0'
        ...
    }

Add a MapView to your layout XML file:

<org.maplibre.android.maps.MapView
    android:id="@+id/mapView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

Tip

There are external projects such as Ramani Maps and MapLibre Compose Playground available to integrate MapLibre Native Android with Compose-based projects.

Next, initialize the map in an activity:

Show code
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.LayoutInflater
import org.maplibre.android.MapLibre
import org.maplibre.android.camera.CameraPosition
import org.maplibre.android.geometry.LatLng
import org.maplibre.android.maps.MapView
import org.maplibre.android.testapp.R

class MainActivity : AppCompatActivity() {

    // Declare a variable for MapView
    private lateinit var mapView: MapView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // Init MapLibre
        MapLibre.getInstance(this)

        // Init layout view
        val inflater = LayoutInflater.from(this)
        val rootView = inflater.inflate(R.layout.activity_main, null)
        setContentView(rootView)

        // Init the MapView
        mapView = rootView.findViewById(R.id.mapView)
        mapView.getMapAsync { map ->
            map.setStyle("https://demotiles.maplibre.org/style.json")
            map.cameraPosition = CameraPosition.Builder().target(LatLng(0.0,0.0)).zoom(1.0).build()
        }
    }

    override fun onStart() {
        super.onStart()
        mapView.onStart()
    }

    override fun onResume() {
        super.onResume()
        mapView.onResume()
    }

    override fun onPause() {
        super.onPause()
        mapView.onPause()
    }

    override fun onStop() {
        super.onStop()
        mapView.onStop()
    }

    override fun onLowMemory() {
        super.onLowMemory()
        mapView.onLowMemory()
    }

    override fun onDestroy() {
        super.onDestroy()
        mapView.onDestroy()
    }

    override fun onSaveInstanceState(outState: Bundle) {
        super.onSaveInstanceState(outState)
        mapView.onSaveInstanceState(outState)
    }
}

For more information, refer to the Android API Documentation or the Android Examples Documentation.

iOS

You can find MapLibre Native iOS on Cocoapods and on the Swift Package Index. You can also add MapLibre Native iOS as a dependency to Xcode directly.

MapLibre Native iOS uses UIKit. To integrate it with an UIKit project, you can use

class SimpleMap: UIViewController, MLNMapViewDelegate {
    var mapView: MLNMapView!

    override func viewDidLoad() {
        super.viewDidLoad()
        mapView = MLNMapView(frame: view.bounds)
        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        view.addSubview(mapView)
        mapView.delegate = self
    }

    func mapView(_: MLNMapView, didFinishLoading _: MLNStyle) {
    }
}

You need to create a wrapper when using SwiftUI.

import MapLibre

struct SimpleMap: UIViewRepresentable {
    func makeUIView(context _: Context) -> MLNMapView {
        let mapView = MLNMapView()
        return mapView
    }

    func updateUIView(_: MLNMapView, context _: Context) {}
}

Tip

You can also use MapLibreSwiftUI, a wrapper around MapLibre Native iOS that offers a declarative API like SwiftUI.

The iOS Documentation contains many examples and the entire API of the library.

Node.js

There is an npm package for using MapLibre Native in a Node.js project. The source code of this project can be found in this repository.

Qt

Please check out the maplibre/maplibre-native-qt repository to learn how to integrate MapLibre Native with a Qt project.

Compose Multiplatform

MapLibre Compose wraps MapLibre Native for various platforms that Compose Multiplatform supports. As of August 2025, iOS and Android are supported, with web and desktop partially supported.

Other Platforms

MapLibre Native can also be built on Linux, Windows and macOS.

Contributing

Note

This section is only relevant for people who want to contribute to MapLibre Native.

MapLibre Native has at its core a C++ library. This is where the bulk of development is currently happening.

To get started with the code base, you need to clone the repository including all its submodules.

All contributors use pull requests from a private fork. Fork the project. Then run:

git clone --recurse-submodules git@github.com:<YOUR NAME>/maplibre-native.git
git remote add origin https://github.com/maplibre/maplibre-native.git

The go-to reference is the MapLibre Native Developer Documentation.

Tip

Check out issues labelled as a good first issue.

Core

Android

Open platform/android with Android Studio.

More information: MapLibre Android Developer Guide.

iOS

You need to use Bazel to generate an Xcode project. Install bazelisk (a wrapper that installs the required Bazel version). Next, use:

bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal"
xed platform/ios/MapLibre.xcodeproj

To generate and open the Xcode project.

More information: MapLibre iOS Developer Guide.

Other Platforms

See /platform and navigate to the platform you are interested in for more information.

Getting Involved

Join the #maplibre-native Slack channel at OSMUS. Get an invite at https://slack.openstreetmap.us/

Become a Sponsor 💰

We thank everyone who supported us financially in the past and special thanks to the people and organizations who support us with recurring donations!

Read more about the MapLibre Sponsorship Program at https://maplibre.org/sponsors/.

Gold:

Logo AWS

Silver:

Logo Microsoft

Logo MIERUNE

Logo komoot

Logo JawgMaps

Logo Radar

Logo mapme

Logo maptiler

Logo CalTopo

Logo SmartMaps

Backers and Supporters:

License

MapLibre Native is licensed under the BSD 2-Clause License.