I need to get travel time by plane between two locations. In Distance Matrix API there is no Travel Mode like "flight" - https://developers.google.com/maps/documentation/javascript/distancematrix#travel_modes
Any suggestions?
I need to get travel time by plane between two locations. In Distance Matrix API there is no Travel Mode like "flight" - https://developers.google.com/maps/documentation/javascript/distancematrix#travel_modes
Any suggestions?
Unfortunately there is no easy way to do this. However, you could do a trick and estimate the flight time by using geocoding and the geometry library. At least if you don't need real flight data.
The steps would be:
Hope this helps.
This is sort of a work-around, but an easy one.
Use the measure distance tool in google maps, then for flight time of regular commercial airliners, divide the distance in miles by 500mph to get flight time in hours. For a small propeller plane (like a cessna), use 165mph.