English | Site Directory

Google Maps API

Google Maps for Enterprise

Includes enterprise licensing and support

FAQ


What are the Google Maps APIs?

The Google Maps APIs give developers several ways of embedding Google Maps into web pages, and allows for either simple use or extensive customization. There are now several API offerings: Google Maps Javascript API, Google Maps API for Flash, Google Static Maps API. In addition, we also offer the Mapplets API to enable the creation of mini-applications that run inside Google Maps. Depending on your needs, you may find yourself using one or a combination of these APIs.

If you operate an enterprise or commercial website, you may also be interested in Google Maps API Premier.

What countries do the Google Maps APIs cover?

The Google Maps team is constantly pushing new map data out and increasing our international coverage. The following spreadsheet shows the latest coverage details. You can filter the spreadsheet with the drop downs at the top (e.g. see all countries with driving directions by selecting "Yes" from that drop down). Please note that data coverage can change if licensing agreements with the data providers change.

Check out the Map Coverage Details Spreadsheet
Also see the Supported Languages Spreadsheet.

Can I put Google Maps on my site without using the Google Maps APIs?

Yes. Google Maps now offers the ability to embed the map that you're viewing into your website or blog, without any programming or use of the Google Maps APIs.

More information is available here.

How do I deliver Maps applications on mobile devices?
The Google Maps API requires a complete JavaScript environment which is not broadly supported on existing mobile devices. We recommend using the Google Static Maps API to deliver customized maps to mobile phones:

http://code.google.com/apis/maps/documentation/staticmaps/

This delivers maps in GIF/JPG/PNG format, and supports a map type targeted at mobile devices.

Which web browsers does Google Maps support?

Google Maps currently supports the following web browsers:


If you're using one of these browsers and are encountering problems, please visit our troubleshooting guidelines.

My site gets a lot of traffic. Can I use the Maps API?

Yes, absolutely. There's no limit to the number of page views of Maps on your site. If you expect your site to generate over 500,000 page views per day, please contact us so we can provision additional capacity to handle your traffic.

Please bear in mind that the geocoding feature (converting addresses to coordinate pairs) is subject to the usage limits documented in this FAQ.

How do I start using the Google Maps API on my site?

Simply sign up for an API key, and you can start putting maps on your site. See the Maps API documentation for examples and details.


What are the Terms of Service for the Google Maps API?

The Terms of Service for the Google Maps API are available at:

http://www.google.com/apis/maps/terms.html

The Terms of Service for Google Maps API Premier are available at:

http://www.google.com/enterprise/maps/terms/v5_1.html

Does my site meet the Terms of Service for the Google Maps API?

The Maps API is available for all sites that are accessible to consumers without charge. You can use the Google Maps APIs on both commercial and non-profit websites as long as your site meets the Terms of Service.

However, there are some uses of the Google Maps APIs that we just don't want to see: maps that identify the places to buy illegal drugs in a city, for instance, or any other illegal activity. We also respect people's privacy, so the Google Maps APIs shouldn't be used to identify private information about individuals.

You should use your own counsel to determine whether your application complies with the Terms of Service before you develop and launch it. Google engineers can only offer technical assistance and are not qualified to offer legal advice. Google reserves the right to suspend or terminate your use of the service at any time, so please read the Terms of Service carefully.

If you operate an enterprise or commercial website, you may also be interested in Google Maps API Premier which has modified Terms of Service that may better suit your needs.

Can I access the Maps and Satellite images directly?
You may not access the maps or satellite images through any mechanism besides the Google Maps APIs (such as the creation of your own mapping API or the use of a bulk tile download script). Your application's access to the tiles will be blocked if it accesses them outside of the Google Maps APIs. See section 5.3 of the Google Terms of Use for more details.
Can I use the Google Maps API on a commercial website?

As long as your site is generally accessible to consumers without charge, you may use the Google Maps API. For example, if your website is supported by advertising, it likely falls within the Google Maps API Terms of Service. If you charge people to place information on your map (e.g. to list their homes for sale), but you display this information using the Google Maps API on a free part of your site, you'll also meet the Google Maps API Terms of Service.

However, not all commercial uses are allowed. If your site meets any of the following criteria you must use Google Maps API Premier:

  • Your site is only available to paying customers
  • Your site is only accessible within your company or on your intranet

Remember, Google reserves the right to suspend or terminate your use of the Google Maps API at any time, so please ensure that you read the Terms of Service carefully.

Can I use the Google Maps APIs for tracking applications?

There is no restriction on displaying real-time data (tracking) with the Google Maps APIs provided that the application is publicly available without charge and otherwise complies with the Terms of Service. For internal-only applications, Google Maps API Premier must be used. See Section 10.9 of the Terms of Service for more information.

Can I use Google Maps in my non-Web application?
Yes, the Google Maps APIs can now be used in Desktop applications, provided that they adhere to the other restrictions of the Terms of Service. Note that in order for a desktop application to be deemed "publicly accessible", there must be a publicly accessible webpage from which it can be downloaded. See Section 7.1c of the Terms of Service for more information.
Can I use the Google Maps APIs on a site that is password protected?

Yes, you can, though you should consult the Terms of Service before using the Google Maps APIs on a password protected website. If consumers can easily sign up for a password without charge or if the purpose of the password protected map is to enhance the publicly available map (i.e. administration), then your site is likely within the Terms of Service. If this is not the case, you will need to use Google Maps API Premier.

What information must I report to the Google Maps APIs?

Per Section 9.2 of the Terms of Service, developers must report whether their Maps API implementation uses a sensor to locate the user's device on the map. An example of a sensor is the Geolocation module in Gears, which provides a latitude/longitude for a user based on their WIFI/GPS/Cell ID information.

Information is available on reporting use of a sensor in the JavaScript Maps API, and in the Static Maps API. There is not currently a mechanism for specifying use of a sensor for developers using the Maps API for Flash.

Note that since the sensor parameter was only recently introduced, pre-existing sites will not be disabled for failing to define the parameter. Developers are required to start reporting the parameter as soon as possible, however.

Can I use screen shots of a Google Maps API application in printed materials or offline media?

Use of Google Maps imagery in printed materials and offline media is subject to the Permission Guidelines published at:

http://www.google.com/permissions/index.html

How can I opt out of including my content in Google search results?

To remove your page or site from search results, follow the instructions provided in our webmaster help center. If we enable indexing of any content that is a part of your Maps API implementation, we will provide updated instructions to opt out of including that content in search results.


How does the Google Maps APIs key system work?

In order to register for a Google Maps API key, you must sign in to your Google Account and agree to our Terms of Service. There is no limit to the number of keys you may obtain under a single account.

For most applications we recommend that you simply register your domain name. Your key will be valid for that domain, its subdomains, all URLs on hosts in those domains, and all ports on those hosts.

For example, if you sign up for a key using http://www.mygooglemapssite.com/, your key is valid for:

  • http://www.mygooglemapssite.com/
  • http://www.mygooglemapssite.com/mysite/

However this key will not be valid for:

  • http://mygooglemapssite.com/
  • http://host1.mygooglemapssite.com/
  • http://host2.mygooglemapssite.com/mysite

If as recommended you request a key for http://mygooglemapssite.com/ your key will be valid for all URLs mentioned above.

Note that a key for http://www.mygooglemapssite.com/ will only be accepted when the site is accessed using this address. It will not be accepted if the site is accessed by IP address (eg. http://10.1.2.3/) or by a hostname that is aliased to www.mygooglemapssite.com using a DNS CNAME record.

If you are developing on a local drive (file://), the key check is skipped in the Google Maps Javascript API and it is less restrictive in the Google Maps API for Flash. Note also that developing on the local drive with the Google Maps API for Flash will result in tiles with "DEBUG" painted on them. If you are developing on localhost, you will need to register a key for http://localhost.

If you're using the Javascript Maps API and your key is not working on your site, put an alert(window.location.host) in your code and reload the page. The domain you see in that alert is the one on which your key should be registered.

If you're using the Maps API for Flash and your key is not working, make sure it's registered for the domain from which the SWF is being served, not for the domain on which the SWF is embedded.

How can I find out the changes introduced in each version of the Google Maps APIs?

We maintain a list of changes between Google Maps API versions at:

http://groups.google.com/group/Google-Maps-API/web/api-version-changes

You can also check which version of the Google Maps API a particular bug was introduced and fixed in using the Google Maps API Issue Tracker at:

http://code.google.com/p/gmaps-api-issues/issues/list

Which version of the Google Maps Javascript API is currently used when I specify v=2, v=2.x, or v=2.s?

The API version currently used when a particular version is not specified is given at:

http://groups.google.com/group/Google-Ma ps-API/web/api-version-changes

You can read more about the Google Maps Javascript API versioning system in the Google Maps API Developer Guide.

How can I load the API inside the google.maps.* namespace?

The standard method for loading the API creates global objects such as GMarker, GMap2, etc. As of version 2.134d of the API, objects are additionally declared within the google.maps.* namespace. Developers who want the objects to only be inside the namespace can specify "file=googleapionly" instead of "file=api" when loading the API in the script tag.

How can I get the Google Maps APIs to display in a language other than English?
The map controls, tooltips, and copyrights have been translated for a subset of languages, listed in the spreadsheet below. The API will sense the browser settings of the user and set the language appropriately. It is possible to override the language in the APIS; more information is available in the JavaScript API documentation and the Flash API reference.

Check out the Supported Languages Spreadsheet.

How can I get the Google Maps APIs to output a different character encoding?

There are various situations where the Google Maps APIs accepts or produces textual output: Map controls, copyrights, geocodes, and driving directions. Since different languages may use different character sets, the Google Maps APIs allows you to specify the output character encoding by appending an 'oe' parameter to your script tag or query, or to specify the input character encoding by appending an 'ie' parameter. For example, you could force utf-8 encoding in map controls in the Google Maps Javascript API by modifying your script tag like so: <script src="http://maps.google.com/maps?file=api&v=2&oe=utf-8&key=abcdefg">

You could also change the output of the HTTP geocoder by modifying the query like so: http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=xml&oe=utf8&key=abcdefg

Can the Google Maps APIs be accessed over SSL (HTTPS)?

The Google Maps JavaScript API and Google Static Maps API can be accessed over a secure (https) connection by Google Maps API Premier customers. If the Google Maps APIs are used with a free Maps API key on a secure site, the browser may warn the user about non-secure objects on the screen.

Additionally, KML/GeoRSS files stored on a secure server cannot be parsed with the Javascript API's GGeoXML class.

How do I report a bug or request a new feature in the Google Maps APIs?

If you experience behavior that you believe may be a bug, please begin by raising it in the Google Maps API Google Group. This will allow other developers to validate the bug, and rule out any potential issues with your code.

If you wish to request a feature, please also first raise it in the Google Maps API Google Group to confirm that a solution that meets your requirements is not already available.

Once you have confirmed that you have identified a new bug, or that your requirements can not be met by the existing functionality of the Google Maps APIs, please report your bug or feature request using the Google Maps API Issue Tracker.

Before adding a bug or feature request to the Issue Tracker please be sure to check that the bug or feature concerned has not already been added. If it has, you can star the issue to register your interest and be notified of updates.

I have a different question/problem. Who should I contact?

Please post your question in the Google Maps API discussion group to get help from the Google Maps developer community. The Google Maps team also monitors and participates in this group.

For best results when requesting help, please keep the following in mind:

  • Search the current discussions. Chances are someone else has experienced a similar issue and found a fix.
  • Submit a link to your site if possible. Only post code snippets if the code is not easily viewable online.
  • Provide all relevant information including browser versions, errors, and all other facts that may be useful in troubleshooting this problem.

Google Maps API Premier customers may also contact the Google Maps API Premier support team. Contact details for the Google Maps API Premier support team were provided in the welcome email with your client id. Please ensure that you always provide your client id when contacting the Google Maps API Premier support team.


I need to convert addresses to latitude/longitude pairs. Can I do that with the Google Maps APIs?

Yes, this process is called "geocoding." The Google Maps APIs provides multiple methods for performing geocoding. In the Google Maps Javascript API, you can geocode using the GClientGeocoder object, and in the Google Maps API for Flash, you can geocode using the ClientGeocoder. Alternatively you can send geocoding requests directly to the HTTP geocoder.

Please be aware of the usage limits that apply to geocoder requests, and note that use of the geocoder for any purpose other than obtaining locations that will be displayed using the Google Maps APIs is a violation of the Terms of Service. You may use the HTTP geocoder to geocode addresses outside of your Google Maps API application so that they may be cached and later displayed using one of the Google Maps APIs, but locations obtained using the HTTP geocoder may not be used by any other application, distributed by other means, or resold.

What countries is geocoding available in?

To see countries currently supported by the Google Maps APIs geocoders, please check out this spreadsheet and select "Yes" in the geocoding dropdown.

The accuracy of geocoded locations may vary per country, so you should consider using the returned accuracy parameter to determine if a good enough match has been found for the purposes of your application. Please note that the availability of geocoding data depends on our contacts with data providers, so it is subject to change.

For geocoding in countries not currently supported by the Google Maps APIs, please browse this list of other geocoding services.

Is there a limit to the number of geocode requests I can submit?

If more than 15,000 geocode requests in a 24 hour period are received from a single IP address, or geocode requests are submitted from a single IP address at too fast a rate, the Google Maps API geocoder will begin responding with a status code of 620. This article explains how to time geocode requests from PHP and provides sample code for doing so. If excessive geocoder usage continues, access to the Google Maps API geocoder from this IP address may be blocked permanently.

When using the GClientGeocoder in Javascript or ClientGeocoder in Flash, geocoder requests are made by the user's web browser and count against the quota for the user's IP address. This means that excessive usage on the part of one user will not impact other users of your site. However, if many users access the Google Maps APIs through a single proxy, they will share the quota of the IP address of the proxy.

When geocoder requests are made using the HTTP geocoder they count against the quota for the IP address of the system making the HTTP request. If you need to submit a very large set of addresses to the HTTP geocoder to cache for later use, you should consider Google Maps API Premier, which provides a separate batch geocoding quota for this purpose.

You can also supplement the Google Maps API geocoder with another geocoding service, a list of which is available here.

Why do the Google Maps APIs Geocoders provide different locations than Google Maps?
The API geocoder and Google Maps geocoder sometimes use different data sets (depending on the country). The API geocoder occasionally gets updated with new data, so you can expect to see results changing or improving over time.
How should I format a U.S. address on a numbered highway for geocoding?

The Google Maps APIs geocoder requires that U.S. numbered highways be specified in addresses as follows:

  • State Highways: XX-NNN where XX is the postal abbreviation for that state and NNN is the highway number. eg. CA-82
  • U.S. Highways: US-NNN where NNN is the highway number. eg. US-101
  • U.S. Interstates: I-NNN where NNN is the interstate number. eg. I-280

What is the meaning of the Accuracy value of a geocoder response?

The Accuracy value represents the scale of the feature that has been geocoded. It does not represent a ranking or level of confidence in the result.

When the geocoder receives a query it attempts to find the best matched feature for the address given. Depending on the amount of data we have for the area concerned, it may be able to identify a specific building that matches, or it may only be able to match the street or district.

If it can only match a higher level feature such as the district it will still return a lat/long, but it will be for the centroid of that feature, which is likely to be offset from the location of the specific address requested. The Accuracy tells you the scale of the object that matched, so you know how precise the geocode is likely to be.

The list of possible values for the Accuracy and the scale of feature that each represents is given in the Google Maps Javascript API Reference.

How do I provide driving directions with the Google Maps APIs?

The Google Maps Javascript API allows you to provide driving directions via the GDirections class. This class provides you with step-by-step access to basic and multi-point driving directions, and can automatically create the overlays and directions panel for you. Additional examples are provided in the documentation.

You can also easily link to Google Maps for driving directions. We suggest you use the following format for driving directions on Google Maps:

http://maps.google.com/maps?saddr={start_address}&daddr={destination_address}

What countries is driving directions available in?

To see countries currently supported by GDirections in the Javascript API, check out this spreadsheet and choose "Yes" in the driving directions column dropdown. Please note that the availability of driving directions data depends on our contacts with data providers, so it is subject to change.

Additionally, GDirections can translate the driving directions instructions into another language by setting the "locale" parameter in the GDirections.load method. The spreadsheet referenced above also indicates current languages available, in the localized column.

What features of KML & GeoRSS are supported in the Google Maps Javascript API?

The GGeoXML class in the Javascript API enables developers to overlay KML/KMZ and GeoRSS files on top of the map. Examples are here.

The KML features currently supported by the GGeoXML class are documented at:

http://code.google.com/apis/kml/documentation/mapsSupport.html

Support for additional geospatial features may be added to the GGeoXml class in the future. Check back here or stay tuned to the Google Geo Developers blog for updated information.

What are the limits on the size and complexity of KML that can be displayed using the GGeoXML class of the Google Maps Javascript API?

The size and complexity limits on the display of KML using the GGeoXML class are documented at:

http://code.google.com/apis/kml/documentation/mapsSupport.html


Can I include advertising on my map?

Yes, you're welcome and encouraged to monetize your maps mashup through advertising. The Javascript API now provides an ads layer feature via the GAdsManager class, which will display context-relevant ads in a special ads layer on your map. These are the same ads that show up on some searches on maps.google.com. By providing your AdSense for Content publisher ID to GAdsManager, you'll enable the ads layer and make money each time a user clicks on the link in an ad's info window.

You can also put AdSense ad units on the same page as your map mashup, outside of the map.

To sign up for AdSense and get a publisher ID, or to learn how to put ad units on your page, visit adsense.google.com.

How much revenue will I earn from the advertising on my map?
If you're using the ads layer, you'll generate revenue each time a user clicks on a link in one of the ad layer's info windows. It's not possible to say how much you'll earn for a certain number of clicks, because your earnings will depend on the actual cost-per-click (CPC) bid by advertisers. However, you can rest assured that we'll always serve the ads that are predicted to maximize your revenue. More information on AdSense revenue is generated is available in the AdSense Help Center.
How can I find my AdSense publisher ID?

To find your unique AdSense publisher ID number, log into your AdSense account at http://www.google.com/adsense. On the My Account tab, scroll down to the Property info section. Your publisher ID for each AdSense product and feature will be located in this section.

Alternatively, you can find your publisher ID number within your AdSense code. Just locate the AdSense code in the HTML source code of your website, and you'll spot your publisher ID in a line like the one shown below:

google_ad_client="ca-pub-xxxxxxxxxxxxxxxx";

What is an AdSense channel?

Please refer to the information on channels in the AdSense Help Center.

What countries is advertising with the ads layer available in?

Any developer whose page content is in one of the AdSense for Content languages can implement the ads layer. Currently, only advertisers from the United States will show ads in the ads layer. As the program continues, ads from advertisers in other countries may become available.

I'm using the ads layer but I don't see ad markers on my map. What am I doing wrong?

If you've implemented the ads layer by initializing a GAdsManager on your map and aren't seeing any ads, there may be several reasons:

  • The first thing to do is to check your code: make sure you pass a valid AdSense ID into the GAdsManager constructor, and make sure you call enable() on GAdsManager after initialization.
  • If the page your map is on has never been crawled by Google, you'll need to wait 2-24 hours for it to be crawled. The page needs to be crawled so that AdSense can analyze the text around your map for keywords. Make sure your robots.txt file is designed so that the Googlebot can crawl the directory your map is residing in. More information on Google site crawling is available here.
  • There are several reasons why AdSense may choose not to display ads on your site after seeing the results of the Googlebot crawl. Please refer to the information on these restrictions in the AdSense Help Center.
  • If you've followed the above steps, you should see occasional ad markers show up on your map. Where ads show up will depend on locations advertisers are targeting. You're more likely to see ad markers show up around densely populated cities, as there are a greater number of advertisers in those areas. In addition, you likely will only see ads show up when the map is centered on an area within a country where ads layer ads are available.

How do I use a Google Maps API Premier client id with the Google AJAX API Loader?

To use a Google Maps API Premier (formerly Google Maps Enterprise) client id with the Google AJAX API Loader, first load the common loader using your Google Maps API Premier key:

<script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"></script>

You must then provide your Google Maps API Premier client id as an additional parameter when loading the Google Maps Javascript API:

google.load("maps","2", {"other_params":"client=gme-yourid"});

Substitute your key for ABCEFG and your client id for gme-yourid.

More information on using the Google Maps Javascript API with the Google AJAX API Loader is available at:

http://code.google.com/apis/maps/document ation/index.html#AJAX_Loader

How do I access the Google Maps APIs over SSL (HTTPS) using a Google Maps API Premier client id?

To access the Google Maps APIs over https you must first notify the Google Maps API Premier support team of the https sites on which you wish to use the Google Maps API. You will then be issued with Google Maps API Premier keys for the sites, and instructions on accessing the Google Maps APIs over https.