2

How to use Google Static Map Path API for showing a path containing more than 1000 lat-longs points? I tried encoding the latlong using PolyUtils.encode() but still the the final url formed using encoded string exceeds the url length limit of 2048.

11
  • I have the same issue like yours. I think you can not draw real path with static map API. Yes I succeed in displaying path but it is just a straight line nothing more. Commented Aug 13, 2015 at 6:14
  • I think that's limitation when use Google Map with free. Commented Aug 13, 2015 at 6:22
  • @MrNeo So, do they provide different API for paid? Commented Aug 13, 2015 at 6:54
  • you could access here and click Get in touch to contact them for more information. Commented Aug 13, 2015 at 7:03
  • @MrNeo Yeah I just did. Thanks!! Commented Aug 13, 2015 at 7:24

2 Answers 2

0

Short answer: you can't pass more than 2048 characters. It's not possible to do it with the Google Static Maps API.

On the other hand, you could use the JavaScript API and take a snapshot with html2canvas.js.

See the example I provided in this other post: https://stackoverflow.com/a/37750987/4537906

Sign up to request clarification or add additional context in comments.

Comments

0

Recently, the URL length limit was changed to 8192 characters as the response of feature request in public issue tracker.

https://developers.google.com/maps/documentation/static-maps/intro#url-size-restriction

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.