-1

I am using google-service-api(java) to get the directions, But i am using lat long instead of location names this will work for origin and destination but for waypoints its asking array of string(location names). is there any way to use the lat long instead of location names in waypoints?

i am creating request like this,

DirectionsApi.newRequest(context).mode(TravelMode.DRIVING).origin(start).destination(end).waypoints(//String array).await();
Manjunath M
  • 588
  • 1
  • 6
  • 30
  • Why don't you use 2 step. 1.find name with lat long 2.use name in waypoints. Ref) http://stackoverflow.com/questions/6159074/given-the-lat-long-coordinates-how-can-we-find-out-the-city-country – Gary Y Kim Feb 18 '16 at 12:09
  • But i am getting only lat lang thats why i need to pass only latlang – Manjunath M May 02 '16 at 11:37

1 Answers1

1

We can create the google latLng object by providing the lat long then we have to change it to string by using toString method after that we can pass that string directly to waypoints() method.it'll work.we don't have to reverse geocode it.

Manjunath M
  • 588
  • 1
  • 6
  • 30