I am trying to show path between 2 different locations via google static maps api. It's working for short distance. But Poly line is not able to draw for long distances may be due to delimit of Url parameters. How can I make it work for long distances?
Asked
Active
Viewed 512 times
-1
-
1It is difficult to answer the question without sample code that demonstrates the issue. If you check in Directions calculator it looks like the directions service can can return the route: https://directionsdebug.firebaseapp.com/?origin=Ahmedabad&destination=Goa – xomena Nov 11 '17 at 11:43
1 Answers
0
You should reduce the points you get for the path. There special mathematical algorithms that will do it without losing any quality in viewing the path, especially on a higher zoom level. In the next step, you can encode the path-points.
I think all you need you can find in this discussion: Static Maps: Drawing polygons with many points. (2048 char limitation)
More you can find if you search for "simplify path" and maybe "encode Path". Good Luck, Reinhard
PS.: Under GPSies.com you can plan a path, save and download it with different levels of reduced path-/trackpoints. Maybe you can use it for testing.

Farhana Naaz Ansari
- 7,524
- 26
- 65
- 105

ReFran
- 897
- 8
- 14