Reputation: 3264
I am developing an application related to maps.
By using that I want to develop a code to find the distance from current location to given location, get directions from current location to given location, and get the estimated time to reach from current location to given location.
Upvotes: 2
Views: 1921
Reputation: 14728
You get the distance between two locations as follows:
location1.distanceTo(location2);
The result is in meters, as a float. But this is distance as the crow flies.
To get the directions between two locations, including the distance of that route, and the travel time, you need to use Google Directions API
Upvotes: 5