Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit 25fd913

Browse files
authored
Update README.md
1 parent e7dd53b commit 25fd913

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

README.md

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
## Update to MapLibre Navigation SDK for Android
22

33
We recommend that you use the successor of the GraphHopper Navigation SDK, which is the [MapLibre Navigation SDK](https://github.com/maplibre/maplibre-navigation-android).
4-
5-
To build an example with MapLibre follow these steps:
6-
7-
1. Download IntelliJ with Android support (or IntelliJ Ultimate)
8-
2. git clone https://github.com/maplibre/maplibre-navigation-android
9-
3. Open the downloaded project in IntelliJ (this might take a while as it loads the dependencies)
10-
4. In app/src/main/res/values/developer-config.xml (created while the build) replace two lines with 'base_url' and 'mapbox_access_token' and set the correct GraphHopper GH_API_KEY:
11-
```xml
12-
<string name="base_url" translatable="false">https://graphhopper.com/api/1/navigate/</string>
13-
<string name="mapbox_access_token" translatable="false">pk.[GH_API_KEY]</string>
14-
```
15-
5. Additionally to the routing (provided by GraphHopper) you need a map tiles API from a different provider. In the same developer-config.xml enter the style URLs for e.g. mapilion:
16-
```xml
17-
<string name="map_style_light" translatable="false">https://tiles.mapilion.com/assets/osm-bright/style.json?key=MAP_API_KEY</string>
18-
<string name="map_style_dark" translatable="false">https://tiles.mapilion.com/assets/dark-matter/style.json?key=MAP_API_KEY</string>
19-
```
20-
6. In NavigationUIActivity for NavigationRoute.builder uncomment `this.user("gh")` and `this.profile("car")`. (Do the same in the example "MockNavigationActivity".)
21-
7. You can now run the application on your Android device from IntelliJ (connect your device and a green triangle near your device name will show up)
22-
8. Click "Navigation UI" where it should show your location as a gray circle.
23-
9. Tap on the map to add a destination. It will now show the route on the map and a "Start Route" button will appear.
24-
10. Click the "Start Route" button and the turn by turn navigation will start.
4+
An example where GraphHopper routing is integration is available [here](https://github.com/graphhopper/graphhopper-navigation-example).
255

266
---------
277

0 commit comments

Comments
 (0)