1

According to this solution Why retrieving Google Directions for Android using KML data is not working anymore?

I've got the question what is the shortest way to draw the route through the waypoints.

  1. Implement itemizedRouteOverlay to store routes route from start point->waypoint1, waypoint1->waypoint2, waypoint2->destination

  2. Merge route objects and draw it as routeOverlay Route1=start->waypoint1, route2=waypoint1->waypoint2 etc..

  3. Add implementation of waypoints in parser

  4. Any other, better way?

Any hints will be appreciated.

Community
  • 1
  • 1

1 Answers1

1

The fastest way I found is to: add parameter waypoint with via: prefix for each waypoint to JSON URL string, so it doesn't create more than one leg in JSON (crucial part because there is only one leg support in GoogleParser provided with that example). Google offers only 8 waypoints support for non buisnes customers, so that was another problem. I've managed to bypass it by spliting route to sub-routes, where ending point of one route, was begining point of another route. Each route was stored in list as different routeOverlay object, and then one-by-one added to mapView in the loop .