Google logo

Google Earth Enterprise Documentation Home | Fusion resources and projects

Add KML layers

Fusion lets you add KML layers in addition to fused vector layers. KML layers consist of a wrapper layer (typically a small, simple resource) that contains a link to a KML or KMZ file. The layer displays the linked content, not the wrapper layer content.

KML layers are useful if you want to give users access to data that isn't hosted on the Earth server, or to data that changes frequently. In fact, the free edition of Google Earth includes many KML layers that stream data from Google servers to the client.

Each vector project must include at least one resource that is not a KML layer. If you try to build a project consisting only of KML layers, the build will fail with the error "No vector packets for indexing."

To add a KML layer:

  1. Open your Fusion vector project and click the blank-page icon in the top right corner of the dialog box.

    The Add a layer dialog box appears.

  2. Add a resource to use as a wrapper layer for the KML or KMZ link.

    Users won't see the content of the wrapper layer, so add any small, simple resource that contains lines or polygons. For example, the "CAHighways" resource in the Fusion tutorial dataset. If you want to use a resource that is already in your project, add it a second time.

  3. Right click the new layer and select Layer Properties.

    The Layer Properties dialog box appears.

  4. In the KML URL field, enter the link to your KML or KMZ file.

    The file must be on a server that is accessible to users at all times. If the file is missing, the client may fail. To prevent this, place the file on the Google Earth server or place a small KML file on the Earth server that contains a NetworkLink reference to your target KML or KMZ file on another server.

  5. Enter a name and select an icon for the layer.
  6. Click OK to save your changes and exit the Layer Properties dialog box.

    Your vector project lists your new KML layer.

  7. Save your vector project, then rebuild and publish your database.

    After the client connects to the published database, users can view the KML layer.

To add multiple KML layers:

If you want to add multiple KML or KMZ files that aren't hosted on the Google Earth server, the best practice is to place one KML file on the Earth server that links to all your files on other servers. Then you can create a layer that loads the single KML file. That way, even if the server that hosts your KML or KMZ files stops responding, the client is unlikely to fail.

  1. Place your KML or KMZ files on the server or servers that will host them.
  2. Create a new parent KML file that contains NetworkLink references to each of your KML or KMZ files.
  3. Place the parent KML file on the Earth server.
  4. In Fusion, create a KML layer that links to the parent KML file on the Earth server.

    In the Earth client, users can expand the parent KML layer to select a child KML layer.