binoy
binoy

Reputation: 1768

Google static map is not displaying

I am listing lots of businesses and their static google maps in my page (with a pagination). While going through the pages, sometimes Im getting the following image instead of maps. And if I refresh the page again, I will get the correct maps.

enter image description here

I am sure that I have not reached the usage limit (because Im getting the same maps on page refresh).

My sample request is given below . (Note: I am not passing any API key. Is it really required ? )

<img src="//maps.googleapis.com/maps/api/staticmap?center=168 Palmers Lane Pokolbin,POKOLBIN,NSW,2320,Australia&zoom=11&size=240x180&maptype=roadmap&sensor=false" />

Upvotes: 4

Views: 4307

Answers (1)

Engineer
Engineer

Reputation: 48813

Pass encodeURI-ed urls to src:

<img src="//maps.googleapis.com/maps/api/staticmap?center=168%20Palmers%20Lane%20Pokolbin,POKOLBIN,NSW,2320,Australia&zoom=11&size=240x180&maptype=roadmap&sensor=false" />

Upvotes: 4

Related Questions