Home

Awesome

<p align="center"> <a href="https://jitpack.io/#maplibre/maplibre-navigation-android"> <img src="https://jitpack.io/v/maplibre/maplibre-navigation-android.svg" alt="Jitpack"> </a> </p>

Maplibre Navigation SDK for Android

The Maplibre Navigation SDK for Android is built on a fork of the Mapbox Navigation SDK v0.19 which is built on top of the Mapbox Directions API and contains the 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 Map tiles and Directions API.

<div align="center"> <img src="https://github.com/maplibre/maplibre-navigation-android/blob/main/.github/preview.png" height="350px" alt="MapLibre Navigation Android"> </div>

License

Why have we forked

  1. 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.
  2. Mapbox decided to put telemetry in their SDK. We couldn't turn this off without adjusting the source.
  3. We want to use the SDK without paying Mapbox for each MAU and without Mapbox API keys.

All issues are covered with this SDK.

What have we changed

Getting Started

If you are looking to include this inside your project, you have to follow the following steps:

Gradle

Step 1. Add it to 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:4.0.0'

Maven

Step 1. Add it to 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>4.0.0</version>
	</dependency>

sbt

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" % "4.0.0"

leiningen

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 "4.0.0"]]	

To run the sample code on a device or emulator, include your Mapbox access token and map tile provider URL in developer-config.xml found in the project.

Getting Help

<a name="sample-code">Sample code

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.

Contributing

We welcome feedback, translations, and code contributions! Please see CONTRIBUTING.md for details.