Is there any limit to number of markers that can be placed on google static maps?
Asked Answered
G

3

16

Is it possible to place (say 1000) markers (using set of LAT-LONG values) on Static Google map image? Also, is there some sort of HTTP POST method to achive this or URL is the only way to go?

Basically, I was looking into Bing maps REST service - Imagery and I found that maximum 100 pushpins (markers) can be placed on to Bing map.

I would like to generate static map with unlimited markers/pushpins. Google or Bing does not matter.

Something like this: http://msdn.microsoft.com/en-us/library/ff701724.aspx#code-snippet-19

Gromme answered 18/6, 2013 at 19:35 Comment(0)
S
11

The documentation for static maps states:

URL Size Restriction

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. Note, however, that certain characters may be URL-encoded by browsers and/or services before sending them off to the Static Map service, resulting in increased character usage. For more information, see Building a Valid URL.

Sanjak answered 19/6, 2013 at 1:13 Comment(2)
Yeah, I read that. So basically, it's same as Bing. 2048 characters in URL is just under 100 GeoCode values. So, again no more than 100 markers.Gromme
@Gromme I managed to render 400 markers, but for us we needed min of 1k markers per static image, which sadly their api dont support anything near thisSall
I
18

As far as I know there is no limit on how many markers you can add to a google-maps based map - however the performance of your map will decrease when you add a lot of them.

There is a nice article on developers.google.com (https://developers.google.com/maps/articles/toomanymarkers) that shows how to deal with lots of placemarks by either clustering them or rendering them on a separate layer.

Ileana answered 18/6, 2013 at 19:42 Comment(3)
Thanks @Nikolaus, Let's forget about the performance part for now. My concern is how is it even possible to pass in (say 200) LAT-LONG values to a URL (if there is no HTTP POST method available). There must a be a restriction on URL length.Gromme
then try to use the json api (developers.google.com/maps/tutorials/data/importing_data) or create a kml layer from your dataIleana
I can't use JavaScript @Nikolaus. That's why I thought Static Maps API would be a better choice.Gromme
S
11

The documentation for static maps states:

URL Size Restriction

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. Note, however, that certain characters may be URL-encoded by browsers and/or services before sending them off to the Static Map service, resulting in increased character usage. For more information, see Building a Valid URL.

Sanjak answered 19/6, 2013 at 1:13 Comment(2)
Yeah, I read that. So basically, it's same as Bing. 2048 characters in URL is just under 100 GeoCode values. So, again no more than 100 markers.Gromme
@Gromme I managed to render 400 markers, but for us we needed min of 1k markers per static image, which sadly their api dont support anything near thisSall
M
3

I am pushing over 16000 markers with no problem at all, not even performance. I am using the javascript API, as long as you can put that into a variable, and push it to the canvas at a reasonable pase (1 per seccond is the speed i am pushing the markers ) there's no problem

Musil answered 30/4, 2016 at 14:39 Comment(2)
4.44 hours is a "reasonable pace"?Obey
This question is about Static Maps, not the JavaScript SDK.Indonesian

© 2022 - 2024 — McMap. All rights reserved.