0

0 down vote favorite

In new google map there are several travel mode like driving, bicycling, walking and transit but they also added fly mode also. I can choose fly mode in new google map but i cant get fly travel mode in google maps v3 api. I want to to show fly distance between two cities on my site like google map shows on google map.

http://maps.googleapis.com/maps/api/directions/xml?sensor=false&origin=Lahore&destination=Multan&mode=driving

$base_url = 'http://maps.googleapis.com/maps/api/directions/xml?sensor=false';
$xml = simplexml_load_file("$base_url&origin=Lahore&destination=Multan");
echo $distance = (string)$xml->route->leg->distance->text;
echo $duration = (string)$xml->route->leg->duration->text

driving, walking and other modes are working but fly is not working.

2
Contributors
2
Replies
10
Views
4 Years
Discussion Span
Last Post by Burhan_1
0

I've never used this API before and this might sound really really dumb, but have you tried using the keyword "flying" instead of "fly"? (Since you're also talking about driving, walking)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.