-
Notifications
You must be signed in to change notification settings - Fork 657
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
Calculating routes Offline in Android #4704
Comments
some tips:
|
Awesome, that helps a lot man, thanks for the tips! |
The tileset is the final map data that the router uses to calculate a route. To build a tileset you need to download some unprocessed raw data, eg. from geofabrik.de or one of the osm planet mirrors.
you can do that but that means that you need to turn them into something routable (the tileset). this is a very expensive operation. you can do it on the client side (the bit of your code that wants to find routes) but it manes that the client has to have a lot more dependencies and needs to spend a lot of resources and time to make the data routable. a better approach, like i outlined above is to have the server build the tileset from the pbf once and then you can cut pieces of it (collections of tile files) to ship to your client at runtime. anyway what you said is possible but its a lot more painful |
ohh i think i got it, thats would be great, i think. because right now im rendering the map itselft using the mapsForge ".map" format anyway.. so in this way, i just need to send the tileset and the .map format to the client. instead of having to render the pbf map and do all this conversion of tileset all in the client. i think this sounds good. Thank you very much |
oh i have no clue about mapsForge 😄 the only stuff im talking about has to do with routing. if you are using this for display as well then you'll need to keep doing whatever it is you are doing there. |
Oh yeah, dont worry about it, if i can get valhalla working in my app and I'm able to send coordinates to it and receive the geojson. ill figure out a way to display it in mapsforge 😅 |
For Reference, i got the android build to complie, this is what i used:
then to compile valhalla:
Dont know yet if it will work inside android or not, but it compiled without errors 😁 |
Unfortunately this approach ended up not working. The .so file that was build seems like it was just a symbolic link, and the file it was pointing to didn't exists. So I assume it actually didn't build. After that I've tried a lot o things. but now something is broken in my Linux and i cant even build protobuffs anymore. It seems like i broke everything 😅 |
Hello,
I would like to compile Valhalla to add it to my android application so I`m able to calculate routes from point A to B totally offline.
Looking into some issues and documentation, it seems like this is possible. For my specific use case, can someone show me which module from Valhalla should I compile, and how would I approach compiling only it.
It would also be great if someone is able to show me which function does this route calculation, then later Ill try to write the JNI integration for it.
But right now I'm kind of stuck. I was able to compile Valhalla for Linux, but i don't know how to disable the unwanted modules or what are the unwanted modules in my case.
I saw some scripts in some issues of the past, related to android compiling, but they don't seem to work anymore, specially the compiling Protobuff and Boost parts. And am a bit of a noob with C++, so I don't know how to start approaching this problem.
Sorry for the ramble, but help would be very appreciated!
The text was updated successfully, but these errors were encountered: