Android Google Maps API [closed]

1

Is it possible to trace a route in the Google Maps with information about traffic, accidents and average time of arrival at the destination? Or some lib of the type that makes this type of request?

    
asked by anonymous 24.02.2016 / 03:15

1 answer

0

To achieve this you will need to use the google maps directions API .

As the question involves many things I recommend that you read the API documentation, which is in Portuguese.

link

There you will find what you need. Basically you will make a request using the source and destination, and will receive a JSON with various information, including the time to arrive at your destination and the landmarks. To view the route you will need to create a PolyLine on your map with the landmarks returned in JSON.

To display information about traffic visually on the map (the street appears red in case of traffic jam for example) you do not need to use the directions API, just use the GoogleMap.setTrafficEnabled (true) on your map.

    
25.02.2016 / 15:56