Using Network Links Effectively

Network links allow you to tell more complex and dynamic stories with your KML files. They allow you to do many more things, from keeping content updated to changing content in response to what the user does. You can learn about specifying network links in the KML Reference.

This tutorial explains why network links can make your stories more compelling.

Tutorial Contents


  • In April 2017, Google Earth on Web was released, which puts Earth on the browser. However, for this tutorial, you will need Earth for Desktop installed on your computer. Download the latest version here.

Using KML as a Bookmark

In the most generic sense, a KML file with a network link acts as a gateway into the content on your server. Your users download your KML file just once, but they will always see the most updated content, even if you updated it after they download your KML.

In fact, many content owners choose to have users download a KML file that includes only a network link. The KML file is similar in some ways to a bookmark in a web browser, allowing users to quickly get back to content that they like while allowing the content owner to update content at will. As a side benefit, the initial download of your KML file is always small and fast.

Loading Large Data Sets

Along with regions, network links introduce a powerful mechanism for downloading small parts of large multimedia files only when they're absolutely needed. For more information about this technique see the documentation on Regions, section on "Smart" Loading of Region-Based Network Links.

Example: 3D Models

3D models can bring more realistic representations of structures and objects to your KML files. However, they can also be quite large in size, resulting in slow downloads, if you include them all in a single KMZ file.

One solution is to include links to your 3D models in your placemark balloons. However, that requires users to open placemarks and click on links. You might want models to just appear in their geospatial context as the user is flying around.

A network link using the onRegion value for viewRefreshMode is the best solution, because it allow users to download models on-demand, based on where they are flying in Google Earth.

Example: Superoverlays

A similar challenge occurs with very large images. If you have large image overlays you'd like to include, you can also use region-based network link. When the user is zoomed out, you can show lower-resolution imagery, and as the user zooms into a particular region, you can show the higher-resolution image for that particular region. By using network links you can load the image parts you need on the fly.

To learn how to make use of this technique, take a look at the Super Overlays section of the Regions documentation.

Using Real-Time Data

After a user downloads your KML file, even if the user doesn't fly to a specific region, you might want to update your content simply because it has changed. Perhaps you have real-time data from sensors, or maybe you're monitoring exit-poll results on election night.

Network links allow you to update content based on the passage of time. Using refreshMode and refreshInterval or expires, you can choose to refresh after a few seconds or when a deadline passes.

What does refreshing allow you to do? You could simply reload the entire file behind the original network link. Alternatively, you could change only the parts of the KML that have actually changed. Perhaps you only update sensor placemarks where you have new data, or only update districts where new votes have been counted.

Discussion and Feedback

Have questions about this tutorial? Want to give us some feedback? Visit the Google Earth Help Community to discuss it with others.

What's Next