Read More

Get the distance & duration between two locations in android?

We are getting distance & duration between two locations in Google map. We will find duration according to different Traveling Modes such as –

You’ll need to request the directions over HTTP. You can do this directly from Android, or via your own server.

Request the google map server with URL like-

with GET request method.

where “output” is a format of the response and parameter contains values.

Connection to communicate Map Server with URL.

Getting the response from the Google map server and parse response string to JSON format.

Getting distance & duration-

 

Sources: Google Maps Directions API

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close