I am currently making an open street map android project. I have been following tutorials on getting a route between two co-ordinates on a map, but when i run my code a route from point A to point B is not displayed. What is displayed on the map is a straight line from point A to B.
link to tutorial: https://github.com/MKergall/osmbonuspack/wiki/Tutorial_1
my code
RoadManager mRoadManager = new OSRMRoadManager(this);
ArrayList<GeoPoint> waypoints = new ArrayList<GeoPoint>();
waypoints.add(start);
GeoPoint endpoint = new GeoPoint(41.4,-1.9);
waypoints.add(endpoint);
Road road = mRoadManager.getRoad(waypoints);
Polyline roadOverlay = RoadManager.buildRoadOverlay(road);
mMapview.getOverlays().add(roadOverlay);
mMapview.invalidate();
}
Based on the tutorial I expected the directions from A to B to be displayed. Can anyone spot what I'm doing wrong or recommend a routing API that I can use.
I have found this error in logcat:
E/BONUSPACK: OSRMRoadManager::getRoad: request failed.
I bumped into a person with the same issue, it is explained better on his thread link: https://github.com/MKergall/osmbonuspack/issues/218