Skip to main content.

Google Releases Static Maps API

John Musser, February 25th, 2008   Comments(3)

If you want a dead-simple way to create custom maps without needing to worry about JavaScript or programming then the just announced Google Static Maps API may be your answer. Google’s new API allows you to generate the maps using a regular URL (ala REST) along with parameters specifying location, size, etc and it returns a unique GIF image with that map. We have created a Static Maps API profile with the details. Here are some notes from their announcement:

The Google Static Maps API returns a GIF-format image in response to a HTTP request via a URL. For each request, you can specify the location of the map, the size of the image, the zoom level, the type of map, and the placement of optional markers at locations on the map. You can additionally label your markers using alpha characters, so that you can refer to them in a “key.”

You embed a Static Maps API image within a webpage inside an img tag’s src attribute. When the webpage is displayed, the browser requests the image from the the Static Maps API and it renders within the image location.


googlesamplemap

A few other details of note:

  • Usage: A Google Static Maps API query request looks like the following and takes parameters like size (width and height in pixels), zoom-level, type (roadmap or mobile), and any marker placements:
  • http://maps.google.com/staticmap?parameters

  • Usage limits: There’s a query limit of 1000 unique image requests per user per day. For developers that may expect to hit this limit the best strategy is to use a caching mechanism to store generated images on their own servers.
  • API key: The only requirement to use the API is to sign-up for an API key, which works for both this as well as the standard Google Maps API.
  • Google offers a wizard to help walk you through the process of creating a Static Maps map.

3 Responses to “Google Releases Static Maps API”
  1. […] mer javascript! Nu finns det en ny anropsmetod för Google Maps där du skickar datat via GET-parametrar i urlen. […]

  2. There’s been some confusion about the limit (we need to improve our docs on it). There is a per-user-IP limit of 1000 images. A user that goes over the limit will currently get an HTTP 400 for the image, so they will likely see a broken image in most browsers.

    The per-IP limit is designed to prevent people from writing scripts to programmatically retrieve thousands of images (a script is sent from a server and thus comes from one IP). We’ve guessed that a user (with their own IP) just browsing web pages won’t happen upon more than 1000 static map images each day. We may raise the limit later if that turns out not to be the case.

    The important thing is that a developer shouldn’t need to worry about just hosting a static map image on a webpage, even if it gets a lot of traffic.

  3. Hi Pamela, thanks for the clarification. Certainly makes a difference and can see how for developers that means it’s much less likely of hitting a limit.

    Comment by: John Musser - February 25th, 2008 at 11:01 pm
 

Leave a Reply

Our Sponsors

StrikeIron. 100+ web services. Build Something.Build mashups at openkapow1000GB Free Video Hosting at UserplaneSerena Mashup Composer - Just bleep itEnterprise data masups with SnapLogicMonetize your music spaceThumbplay: Add Mobile to Your Apps
Develop and deploy. Wicked, Fast, Free. BungeeConnect

Member of
Web 2.0 Workgroup

 

 
Close
E-mail It