2

I need to know streets's name taken from a route provided by Google Maps API V2 Android.

I have been reading Maps Api but i don't find solution.

Thank you for your help!!

ermanno.tedeschi
  • 96
  • 1
  • 2
  • 11

1 Answers1

0

You could geolocate the coordinates provided as each point along the route using the maps geolocation api: https://developers.google.com/maps/documentation/geocoding/

This would provide you the full address of each point along your route.

Edit. The only other way I can think of would be to use Google Turn by Turn directions: https://developers.google.com/maps/documentation/javascript/directions#Steps which will obviously give you the steps to follow the route involved (involving street names), but I thought using turn by turn directions within an android app was against the TOS (I could be wrong on that) due to direct competition with Google own Maps app.

Edit Take a look at this similar question: Highlight a specified route on Google Maps v2 Android If you read the code posted in the first answer he is iterating through all of the points along the route and using them to build a polyline. With a simple geocode inserted this would achieve what you're looking for.

Edit In fact looking at the response, it already contains the name of each road along the route as part of the response from the API.

Community
  • 1
  • 1
ChrisSwires
  • 2,713
  • 1
  • 15
  • 28