Always empty ResponsePath on Android offline routing

I tried to download osm map data and created routing data as in this document: https://github.com/graphhopper/graphhopper/blob/master/docs/android/index.md. Then I can show the map perfectly (you guys have done a really amazing work). However, the problem is that I could not get routing with the generated routing data. This is my country map -gh folder:
Screen Shot 2020-05-14 at 10.52.33 PM

Here’s the code I used for calculating path:

GHRequest req = new GHRequest(fromLat, fromLon, toLat, toLon)
                    .setLocale(Locale.US)
                    .setAlgorithm(Algorithms.DIJKSTRA_BI);
            req.getHints().put(Routing.INSTRUCTIONS, "false");
            GHResponse resp = hopper.route(req);
            time = sw.stop().getSeconds();
            if (resp.getAll().isEmpty()) {
                log("resp.getAll().isEmpty(): " + resp.getDebugInfo());
                return null;
            }

Here’s the logcat I got:

com.graphhopper.android I/GH: loading map
com.graphhopper.android I/GH: loading graph (1.0) ... 
com.graphhopper.android I/GH: found graph car|MMAP_STORE|2D|no_turn_cost|5,15,4,3,5,     nodes:1257789
com.graphhopper.android I/GH: Finished loading graph. Long press to define where to start and end the route.
com.graphhopper.android I/GH: calculating path ...
com.graphhopper.android I/GH: from:21.023161,105.831423 to:21.043471,105.866356
com.graphhopper.android I/GH: resp.getAll().isEmpty(): 

Perhaps it’s related to the 1.0-snapshot version?

This should work for 0.13.

Update: for 1.0 there is a problem and have it fixed in master: https://github.com/graphhopper/graphhopper/commit/d634c41ac9a1a0fe07b071dc226774201c15de7a

1 Like

hey, you’re right. It works now with 0.13. Thanks for the answer. Is it possible to search or do geocoding with offline data?

The GraphHopper routing engine only does the routing.