Showing a route between two points with multiple waypoints

cham picture cham · Jun 14, 2012 · Viewed 15.8k times · Source

I am new to android and developing a navigation based application for android.My question is I want to show a route with multiple way-points between source and destination node in Google maps and I don't know how to do it. I have search for this but most of the results are for two points.

Please help me to solve my problem

e.g:- when app user submits the destination with some way-points the map should display the route from the source to destination with those way-points on the phone.

Thanks !

Answer

Cruceo picture Cruceo · Jun 14, 2012

"I have search for this but most of the results are for two points." You already found everything you need to do this.

For this, you're not "drawing through the waypoints along the way," you're actually going to have to draw a route between 2 points for each waypoint you have:

IE. You want to get from point A to point D, and on the way there are points B and C. The solution is to draw a route from A to B, B to C, and finally C to D.