Includes enterprise licensing and support
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.
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.
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.
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.
Google Maps currently supports the following web browsers:
Yes, absolutely. There's no limit to the number of page views of Maps on your site. If your site gets over 500,000 page views per day, please contact us first so we can make sure we can handle the load.
Please bear in mind that the geocoding feature (converting addresses to coordinate pairs) is subject to the usage limits documented in this FAQ.
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.
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:
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.
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:
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.
If your site will be used to perform vehicle tracking, you must use Google Maps API Premier. Tracking other types of assets is allowed.
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.
Use of Google Maps imagery in printed materials and offline media is subject to the Permission Guidelines published at:
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:
However this key will not be valid for:
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.
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:
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.
<script src="http://maps.google.com/maps?file=api&v=2&hl=de&key=abcdefg">
to get zoom controls that say "Verkleinern" instead of "Zoom out".
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
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.
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.
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:
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.
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.
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.
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.
The Google Maps APIs geocoder requires that U.S. numbered highways be specified in addresses as follows:
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.
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}
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.
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.
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
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.
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";
Please refer to the information on channels in the AdSense Help Center.
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.
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:
GAdsManager
constructor, and make sure you call enable()
on GAdsManager
after initialization.
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
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.