SK16
SK16

Reputation: 642

Find all routes from source to destination in google maps

I am developing an app for local bus system and as per requirement, a bus can have multiple routes from one location to other. So i have to implement methodology like

  1. fetch user's current location
  2. get destination from user and accordingly show user all possible routes to destination
  3. show all paths on map simulataneously with optimal shortest path highlighted with different color.

currently, I have progressed to basic application having functionality

  1. get user's current location and pin point it with marker on google map
  2. getting single path to destination (using google maps api)
  3. plotting it on map by polyline. I have used one tutorial that implements navigation from source to destination.

Now I have to find all possible routes from source to destination. searched for answer but most answers referred to apply single path which I have already done. Any help will be much more appreciated.. Thanks in advance...

Upvotes: 1

Views: 3110

Answers (1)

user3391170
user3391170

Reputation: 101

Use Google Directions API with parameter 'alternatives=true'.

Upvotes: 0

Related Questions