-
-
Notifications
You must be signed in to change notification settings - Fork 74
added graphhopper sample #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| val client = OkHttpClient() | ||
|
|
||
| val url = if (provider == "valhalla") "https://valhalla1.openstreetmap.de/route" | ||
| else "https://graphhopper.com/api/1/navigate/?key=YOUR_KEY" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a demo server, that is working without a key. Do you know that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not aware of one. But there are two options:
- we can provide a demo API key with a certain limited request count per day and
- users could setup a GraphHopper server on their own.
...le/android/app/src/main/java/org/maplibre/navigation/sample/android/core/CoreOnlyFragment.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sample in the app folder, please add the new configurations to our gradle script, that generated on first build. Here the URLs can changed.
I suggest that we add only one URL string (graphhopper_url) instead of two ones (url + key).
And would very happy if we having a sample URL, that is working out of the box. So your idea with a limited key would be enough 👍
Changing the URL on both places:
- Default value generated by gradle script
- Directly in new sample project
Finally, please add a CHANGELOG entry. You can copy it from the valhalla one.
Thanks for your PR 💙 💙 💙
|
Thanks! Can you have a look if the latest commit fixes what you meant? |
Fabi755
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 💙
|
Thanks! |
this adds a new graphhopper sample using the more powerful
POST /navigaterequest. This is the same request format asPOST /routebut with the mapbox compatible response.Also graphhopper can be used for the multiplatform sample via changing provider="valhalla" to "graphhopper".
Related to #151 (comment)
Not sure why the test / build fails here, but locally
./gradle clean buildis green.(Please note that I'm not a good Android/Kotlin dev and let me know possible improvements :) )