The Maplibre Navigation SDK for Android is built on a fork of the Mapbox Navigation SDK v0.19 which is build on top of the Mapbox Directions API and contains logic needed to get timed navigation instructions.
With this SDK you can implement turn by turn navigation in your own Android app while hosting your own Map tiles and Directions API.
- Mapbox decided to put a closed source component to their navigation SDK and introduced a non open source license. Maplibre wants an open source solution.
- Mapbox decided to put telemetry in their SDK. We couldn't turn this off without adjusting the source.
- We want to use the SDK without paying Mapbox for each MAU and without Mapbox API keys.
All issues are covered with this SDK.
- We completely removed the UI part from the SDK so it will only contain the logics for navigation and not the visuals.
- We upgraded the Mapbox Map SDK to maplibre SDK version 9.4.0.
- We upgraded the NavigationRoute with the possibility to add an intercepter to the request.
- We changed the locationLayerPlugin to the location component
- We updated the logic around the implementation of the locationEngine so it can be used with the new locationEngine from the Mapbox SDK.
- We removed the telemetry class from the project. Nothing is being send to Mapbox or Maplibre.
If you are looking to include this inside your project, you have to follow the the following steps:
Step 1. Add it in your root build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
implementation 'com.github.maplibre:maplibre-navigation-android:1.1.1'
Step 1. Add it in your root build.gradle
at the end of repositories:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Step 2. Add the dependency
<dependency>
<groupId>com.github.maplibre</groupId>
<artifactId>maplibre-navigation-android</artifactId>
<version>1.1.1</version>
</dependency>
Step 1. Add it in your build.sbt
at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Step 2. Add the dependency
libraryDependencies += "com.github.maplibre" % "maplibre-navigation-android" % "1.1.1"
Step 1. Add it in your project.clj
at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
:dependencies [[com.github.maplibre/maplibre-navigation-android "1.1.1"]]
Optional (you can also leave it as an empty String):
To run the sample code on a device or emulator, include your developer access token in developer-config.xml
found in the project.
- Have a bug to report? Open an issue. If possible, include the version of MapLibre Services, a full log, and a project that shows the issue.
- Have a feature request? Open an issue. Tell us what the feature should do and why you want the feature.
We've added one navigation example to this repo's test app. We are planning to add more to help you get started with the SDK and to inspire you.
In order to see the map or calculate a route you need your own Maptile and Direction services.
We welcome feedback, translations, and code contributions! Please see CONTRIBUTING.md for details.