-
Notifications
You must be signed in to change notification settings - Fork 75
Offline routing
graphhopper is creating open source Java routing library which can run also on Android device. It uses Mapsforge .map files, and creates own graphs on top of it.
AdvancedMap sample has GraphhopperRouteActivity.java which enables to open a graphhopper graph file package and calculates route between two clicks on map. It shows route as Line, and puts Markers to start and end. To detect clicks there is special MapListener RouteMapEventListener.java.
For instructions how to create graph file and use the library please check graphhopper wiki and sample code. There is no feature to get detailed route instructions yet, just route line and lenght calculations. So no real turn-by-turn navigation, but it is quite fast (route of 500+ km takes less than a second) and promising.
Sample graph with whole German, uncompress before use (will be about 2GB): germany-gh.zip (1.2GB). Using this, routes of 1000+ km took below 5 seconds on Nexus 7, expect more on more modest devices. Other smaller packages are in graphhopper downloads page