Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maplibre/maplibre-navigation-android
Maplibre Navigation SDK for Android
https://github.com/maplibre/maplibre-navigation-android
Last synced: 1 day ago
JSON representation
Maplibre Navigation SDK for Android
- Host: GitHub
- URL: https://github.com/maplibre/maplibre-navigation-android
- Owner: maplibre
- License: mit
- Created: 2019-10-29T12:11:21.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T10:51:43.000Z (7 months ago)
- Last Synced: 2024-04-14T07:11:12.084Z (7 months ago)
- Language: Java
- Homepage:
- Size: 15.1 MB
- Stars: 73
- Watchers: 10
- Forks: 35
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-maplibre - MapLibre Navigation SDK for Android - Turn-by-turn navigation built on MapLibre; a FOSS fork of Mapbox Navigation (Navigation & Directions / Sprite Generation)
README
# Maplibre Navigation SDK for Android
The Maplibre Navigation SDK for Android is built on a fork of the [Mapbox Navigation SDK v0.19](https://github.com/flitsmeister/flitsmeister-navigation-android/tree/v0.19.0) which is built on top of the [Mapbox Directions API](https://www.mapbox.com/directions) 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.
## License
- 100% Open Source
- [MIT License](LICENSE)
- No Telemetry## 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
- We completely removed the UI part from the SDK so it will only contain the logic for navigation and not the visuals.
- We upgraded the [Mapbox Maps SDK for Android](https://github.com/mapbox/mapbox-gl-native/tree/master/platform/android) to [MapLibre Native for Android](https://github.com/maplibre/maplibre-gl-native/tree/master/platform/android) version 9.4.0.
- We upgraded the [NavigationRoute](https://github.com/flitsmeister/flitsmeister-navigation-android/blob/master/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationRoute.java#L425)
with the possibility to add an interceptor to the request.
- We changed the [locationLayerPlugin](https://github.com/mapbox/mapbox-plugins-android) to the [location component](https://docs.mapbox.com/android/api/map-sdk/8.5.0/com/mapbox/mapboxsdk/location/LocationComponent.html)
- We updated the logic around the implementation of the locationEngine so it can be used with the new locationEngine from the [Mapbox SDK](https://github.com/mapbox/mapbox-gl-native/tree/master/platform/android).
- We removed the telemetry class from the project. Nothing is being sent to Mapbox or Maplibre.## 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:3.0.0'
```### Maven
Step 1. Add it to your root `build.gradle` at the end of repositories:
```
jitpack.io
https://jitpack.io
```
Step 2. Add the dependency
```
com.github.maplibre
maplibre-navigation-android
3.0.0
```### 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" % "3.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 "3.0.0"]]
```To run the [sample code](#sample-code) on a device or emulator, include your [Mapbox access token](https://www.mapbox.com/help/define-access-token/) and map tile provider URL in `developer-config.xml` found in the project.
## Getting Help
- **Have a bug to report?** [Open an issue](https://github.com/maplibre/maplibre-navigation-android/issues). 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](https://github.com/maplibre/maplibre-navigation-android/issues/new). Tell us what the feature should do and why you want the feature.### Sample code
We've added one [navigation example](https://github.com/maplibre/maplibre-navigation-android/tree/main/app/src/main/java/com/mapbox/services/android/navigation/testapp/) 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](CONTRIBUTING.md) for details.