javascriptdjangogoogle-mapsgoogle-maps-api-3google-maps-static-api

Google Static Maps URL length limit


I have 153 markers and need to generate a static map with them, but when put them in the url I get an error like this:

414 Request-Uri Too Large

My url is something like this

"http://maps.google.com/maps/api/staticmap?center=13.00,-85.00&size=600x500&maptype=roadmap&markers=13.305,-86.18636&markers=13.72326,-86.13705&......"

Thanks folks!


Solution

  • This response came from the Server (google). So you're not allowed to request such long URLs.

    See the google api doc for more infos:

    Static Map URLs are restricted to 2048 characters in size. In practice, you will probably not have need for URLs longer than this, unless you produce complicated maps with a high number of markers and paths.