Max Frai
Max Frai

Reputation: 64366

Google Maps api

I have to provide such functionality:

User checks 2-10 cities at Google Maps, I count the way between those cities using roads and show the way. The additional information is length of the full way.

Is it possible with google maps?

Upvotes: 1

Views: 890

Answers (1)

Null Set
Null Set

Reputation: 5414

If you already know the order you want to be travelling to the cities in, then you just have to make a DirectionsRequest using the in between cities as waypoints. If you don't know the order, as long as you know the start and end, you can have Google Maps optimize the order of the waypoints for you.

http://code.google.com/apis/maps/documentation/javascript/services.html#Waypoints

Upvotes: 1

Related Questions