1

I am using Here maps SDK in an android project. I want to calculate track here and put it into an android map to route exactly this way (calculated on API)

I tried to get points from Json and map them to waypoints, but the calculated way sometimes differs from the original.

What I have tried so far:

1. Get calculateroute.json from 
https://route.api.here.com/routing/7.2/calculateroute.json

2. Put coordinates to RoutePlan

RoutePlan plan = new RoutePlan();
plan.addWaypoint(new RouteWaypoint(new GeoCoordinate(54.3782893, 18.7009037, 0), RouteWaypoint.Type.STOP_WAYPOINT));
plan.addWaypoint(new RouteWaypoint(new GeoCoordinate(54.2660919, 18.6583687, 0), RouteWaypoint.Type.STOP_WAYPOINT));

3. Calculate route and put to a map 

new CoreRouter().calculateRoute(plan, new CoreRouter.Listener() {
    @Override
    public void onCalculateRouteFinished(List<RouteResult> list, RoutingError error) {
        MapRoute mapRoute = new MapRoute(list.get(0).getRoute()
        new Map().addMapObject(mapRoute)
    }

}

I want to do :

1. Get calculateroute.json from 
https://route.api.here.com/routing/7.2/calculateroute.json

2. Create MapRoute from the calculateroute.json result ( but don't calculate it )

3. Put MapRoute to map and start navigation 

Krzysztof
  • 31
  • 3

1 Answers1

0

Basically there is no direct way to achieve this, a workaround solution is as described in the thread : Backend Calculated Route,Here-API to just show Guidance and route on Map

Dharman
  • 30,962
  • 25
  • 85
  • 135