Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

maplibre-native

> 编程语言
Open source

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.

2.1K stars0 likes1 views
WebsiteGitHub

About

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.

MapLibre Native

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.

Getting Started

Android

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

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

Add a MapView to your layout XML file:

xml
<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
…

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

swift
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.

swift
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:

bash
git clone --recurse-submodules [email protected]:<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

  • CONTRIBUTING.md
  • GitHub Wiki: low-friction way to share information with the community
  • Core C++ API Documentation (unstable)

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:

bash
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:

Silver:

Backers and Supporters:

License

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++maplibremapsvector-tiles

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言