Google Maps – Load Multiple KMZ Files or geoRSS Feeds

geolocationgoogle mapskmlrss

I have multiple KMZ files/geoRSS feeds I want to use as different layers in Google Maps (Not Earth).

How would I do this?

I know of two ways to use KMZ files with Maps:

  1. My Maps You can import KMZ files to your heart's content, but the problem with this is that it paginates the results after about 10 items. I want to have both KMZ files displayed, in their entirety, simultaneously. Consequently, this route does not work.
  2. Maps search for KMZ file This groups the entire KMZ file into one layer. Awesome and exactly what I want. However, how do I get this to work with multiple KMZ files?

I can't simply combine the data into one KMZ file because I'm wanting to combine a live geoRSS feed of planning applications with the shape file I link to in point 2.

Best Answer

I think you should be able to do this using a KML file which contains Network Links to your KMZ files.

The nice thing about the Network Links is that it doesn't have to be KMZ files it can be a script or feed that outputs a KMZ/KML file. There is a demo of how to do this here under the section Generating a Random Placemark

Basically you create a KML file in the following format:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Folder>
    <name>Network Links full of awesome</name>
    <visibility>0</visibility>
    <open>0</open>
    <description>Network link example to show how to overlay several KMZ files on one map</description>
    <NetworkLink>
      <name>Earthquakes Mag 7</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 7</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag7.kmz</href>
      </Link>
    </NetworkLink>
        <NetworkLink>
      <name>Earthquakes Mag 6</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 6</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag6.kmz</href>
      </Link>
    </NetworkLink>
        <NetworkLink>
      <name>Earthquakes Mag 5</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 5</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag5.kmz</href>
      </Link>
    </NetworkLink>
        <NetworkLink>
      <name>Earthquakes Mag 4</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 4</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag4.kmz</href>
      </Link>
    </NetworkLink>
        <NetworkLink>
      <name>Earthquakes Mag 3</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 3</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag3.kmz</href>
      </Link>
    </NetworkLink>
        <NetworkLink>
      <name>Earthquakes Mag 2</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 2</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag2.kmz</href>
      </Link>
    </NetworkLink>
        <NetworkLink>
      <name>Earthquakes Mag 1</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>Earthquakes Mag 1</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_Mag1.kmz</href>
      </Link>
    </NetworkLink>
  </Folder>
</kml>

Then in Google Maps, search using the full URL pointing to your KML file and you get something like this:

Google Maps Multiple Overlays

This displays 7 different KMZ files on the same map but using only one URL - the KML file with all the links in.