Google Maps Image APIs

Static Maps API v2 Upgrade Guide

The Static Maps API version 2 is an enhanced version of the Static Maps API, and has replaced the original API. It contains all of the functionality of the original API and more.

The Static Maps v1 API deprecation period has ended. If you are a developer that already has a website using the Static Maps API version 1, these upgrade tips should help you port your current site's functionality to the Static Maps API version 2.

Important: Maps for Business customers will have to sign their requests. Information on how to sign your request is available in the Maps for Business Web Services guide.

  • Instead of specifying maptype=mobile, specify the desired map type (like maptype=hybrid) and the parameter mobile=true. This way, we can provide mobile optimized tiles for every map type.

  • The color for a path is now specified using "color", not "rgba":

    For example:
    &path=rgba:0x0000FF80,weight:5|37.40303,-122.08334|37.39471,-122.07201|37.40589,-122.06171
    becomes:
    &path=color:0x0000FF80|weight:5|37.40303,-122.08334|37.39471,-122.07201|37.40589,-122.06171

  • Similar to how the path styles were specified before, the marker styles are now specified using key:value pairs, separated by pipes. Marker labels are now denoted using uppercase alpha characters instead of lowercase alpha characters.

    For example:
    midreda
    becomes:
    size:mid|color:red|label:A

  • Instead of specifying the marker style after each marker parameter, specify the style at the beginning of the markers= parameter, and that style will apply to all of the markers proceeding. If you want to show markers with different styles, just supply a new markers= parameter for each one.

    For example:
    markers=37.400465,-122.073003,midreda|37.437328,-122.159928,midreda|37.369110,-122.096034,smallblue
    becomes:
    markers=size:mid|color:red|label:E|37.400465,-122.073003|37.437328,-122.159928&markers=size:small|color:blue|37.369110,-122.096034

  • Marker labels now require uppercase alphanumeric characters in the label parameter. This will allow us to later supply lowercase characters if we wish.

    For example:
    markers=37.400465,-122.073003,midreda
    becomes:
    markers=size:mid|color:red|label:E|37.400465,-122.073003

  • Instead of using the span=parameter to make sure that your static map shows a particular viewport, use the visible= parameter instead, and specify a list of coordinates that must be shown.

    For example:
    center=0,0&span=20,20
    becomes:
    visible=10,-10|-10,10

  • The frame parameter is no longer supported.

After upgrading your existing functionality, you might be interested in adding some of the new API functionality to your website. New features include:

  • Locations (in center, markers, or path parameters) can now be specified as addresses instead of latitude/longitude coordinates.
  • Paths can be specified as encoded polylines.
  • Paths can be filled and rendered as polygons.
  • Colors can now be specified as any 24-bit or 32-bit color.

For more information about using those features, read through the developer's guide.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.