0

I am trying to develop very basic GPS App and want to highlight path between two cities. I used the code in the following post

Answer : Draw path between two points using Google Maps Android API v2

by zeeshan0026.

And the code works fine but when you highlight path between two very far cities then it shows the straight kind of path. I think the problem with the number of LatLng points return by the decodepoly function i am trying to change the shift but nothing helps.

Please somebody help me in this regard.

Thanks in Advance

Community
  • 1
  • 1
Sajal Mittal
  • 103
  • 2
  • 12

1 Answers1

0

Directions API URLs are restricted to approximately 2000 characters, after URL Encoding. As some Directions API URLs may involve many locations along a path, be aware of this limit when constructing your URLs.

For more accurate path between very far cities, we need to use the polyutil.encode and decode functions.

Sajal Mittal
  • 103
  • 2
  • 12