Home
The KMLMManager object makes it possible to use MarkerManager (v1.1) with public KML files, such
as “my maps” files. Markers are added to the manager only when first needed (depending on the
zoomLevel) and cached to speed up reloading. KML files have to be divided by zoom level. Each
file will be loaded only when the MarkerManager actually needs it. Files can also be prefetched
(see implementation below). Make sure the MarkerManager and GMaps js files have been loaded
before using this class.
Get the KMLMManager here .
You also will probably need the MarkerManager .
NOTICE: Internally a GGeoXml object is used to load kml files freeing the user from the same
origin policy of most browsers. This also means this library depends on a private GMaps
interface that could be changed with any new API release. The current release (and the only that
I have tested) is v2.149. You can specify the api version using the google ajax loader:
google.load("maps", "2.149");
or trough the script url:
http://maps.google.com/maps?file=api&v=2.149&key=__YOUR_KEY_HERE__
To support a new version of the GMaps API you could try to adapt the extractMarkers function to
the new internal structure of the GGeoXml object.
Usage example:
bq.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script src="http://maps.google.com/maps?file=api&v=2.149&key=__YOUR_KEY_HERE__" type="text/javascript">
</script>
<script type="text/javascript" charset="utf-8" src="./markermanager.js">
</script>
<script type="text/javascript" charset="utf-8" src="./kmlmanager.js">
</script>
<title>KMLMManager demo</title>
