This page outlines KML support in Google Maps and Google Maps for mobile.
Google Maps supports the following KML elements (that is, KML queries in the Search box and GGeoXml objects in the Maps API):
This list does not apply to Google Earth's export to Google Maps, My Maps import, or My Maps export to Google Earth.
The KML parser generally silently ignores XML tags it does not understand. Refer to KML Elements in Google Maps for further details.
Google Maps currently has specific limitations to the size and complexity of loaded KML files. Below is a summary of the current limits:
Note: these limits are temporary and are subject to change at any time.
| Maximum fetched file size (raw KML, raw GeoRSS, or compressed KMZ) | 3MB |
| Maximum uncompressed KML file size | 10MB |
| Maximum number of Network Links | 10 |
| Maximum number of total document-wide features | 1,000 |
When KML content containing a large number of features (placemarks, polygons, lines) is loaded into Google Maps, a server-side decision is made about whether or not to render the document's features on the server or in the user's web browser. The user experience, including feature appearance and interactivity, will not be affected by this decision; the content will look and behave the same way, regardless of the chosen method.
However, there is a subtle difference in the behavior of these methods that surfaces when using the GGeoXml class to render
KML content in the Google Maps API. When simple KML files are loaded via GGeoXml and client-side, browser-based
feature rendering is chosen, GOverlay-based objects are created and added to the map, triggering addoverlay events accordingly.
On the other hand, when large KML files are loaded with GGeoXml and server-side rendering is invoked, these objects are not created and
addoverlay is not triggered. For this reason, it is not recommended to rely on the addoverlay event being
triggered on individual KML features loaded via GGeoXml.
Google Maps for mobile supports this subset of KML elements:
There are a few ways to access KML in Google Maps for mobile:
A couple of caveats: