0

I have calculated route for 10 waypoints. If i simply create new MapRoute it will draw full route from first to last waypoint. Is it possible to draw part of route, from first to second waypoint? I use 3.4.0.165 HERE SDK version. I have found this answer, but it for previous version.

I have tried to draw only first subleg in this way:

    int duration = route.getTta(Route.TrafficPenaltyMode.AVOID_LONG_TERM_CLOSURES, 0).getDuration();
    RouteElements routeElementsFromDuration = route.getRouteElementsFromDuration(0, duration);
    MapPolyline mapPolyline = new MapPolyline(routeElementsFromDuration.getGeometry());
    map.addMapObject(mapPolyline);

But when map tilt enabled polyline drawn somewhere above roads, and if i change scale polyline change position relative to map tile objects.

Zufar Muhamadeev
  • 3,085
  • 5
  • 23
  • 51

2 Answers2

0

Is there a reason you can't create a new route with your two waypoints? If you're using a stopover waypoint, you will be required to pass through the waypoint no matter what. Thus calculating the route between the first and second waypoint will provide you with the same route as the subset of the full route. If you're using a via waypoint, you can't count on drawing a subset of the route since it could change any minute given you are allowed to deviate away from the next waypoint at which point it will be ignored.

ishan05
  • 41
  • 1
  • 5
  • Task is little complex: i need to display route for two points. And i need to display eta to all points(10 eta in this example). Actualy in every waypoint there is some stoptime, so i would be great if i could get eta for each point with stop time setting. – Zufar Muhamadeev Oct 13 '17 at 06:54
  • Can you calculate the eta for each point yourself? Given you can calculate multiple routes in your case and then just link up the routes together yourself. Assuming it's not too many waypoints, it shouldn't be too cpu intensive. – ishan05 Oct 13 '17 at 19:05
  • Etas should be live. I mean while route navigation eta should change value. It is possible while route navigation. But HERE could start navigation only for one route. But, yeah i could setup some timer and recalculate each route. – Zufar Muhamadeev Oct 14 '17 at 06:22
0

Currently it is not possible, workaround - calculate route between each point and draw required part.

Zufar Muhamadeev
  • 3,085
  • 5
  • 23
  • 51