Adding Time as a Fourth Dimension
Google Earth allows you to explore the world in more than just three dimensions. By
adding a TimeStamp or TimeSpan to your placemarks, your visitors will be able to
explore and animate your content through time. This tutorial expands on the techniques
used in Creating KML with Spreadsheets and
helps you create a set of time-enabled placemarks.
Controlling Time in Google Earth
Whenever time-enabled placemarks appear in My Places, a time slider appears in the
upper-right corner of the 3D display in Google Earth. The time slider allows users to:
- Control the visability of placemarks by adjusting the active time range
- Play through the timeline as an animation
To learn how to use the time slider, refer to the overview in the Google
Earth User Guide, and then try playing with the following visual example in KML:
Also explore these KML collections from the Google Earth Blog to get ideas on how you can use time in your
TimeStamp and TimeSpan
There are two ways of representing time in KML:
TimeStamps specify one or more single moments in time, such as the
- Natural or environmental diasters
- Passing of a legislation
- Scientific observations
- Program launches
- Project milestones
- Stops along a poltical tour or expedition
TimeSpans specify time periods that are bounded (beginning and end)
or unbounded (beginning or end):
Bounded: Such as art, social, or cultural movements, poltical terms, or
Unbounded: Such as ratification of statehood or an ongoing conflict or
You must specify time according to the XML Schema's definition
of dates and time. For details and use examples, see the official KML 2.1 Reference. Here are a few examples of valid KML date/time formats:
Date: 1999, 1999-12, 1999-12-31 (year, month, and/or day)
Date and Time: 1999-12-31T23:59:59Z (UTC),
1999-12-31T23:59:59-07:00 (UTC +/- hour deviation for time zones)
Before You Start
Before you start the procedure below, we strongly recommend that you complete the
Creating KML from a Spreadsheet tutorial, which
shows you how to generate KML by entering data into a spreadsheet. The following
procedure builds on the techniques you learn in that tutorial and adds the ability to
for your placemarks.
Copy the Sample Spreadsheet
To begin, open the starter spreadsheet. If you're not already signed in to
your Google Account, you'll be asked to do so. Once signed in, you'll see a spreadsheet
that you can edit.
Edit the Spreadsheet
- On the Template sheet, in the Required Information section,
replace the sample data with your own information. This will become part of the
template for each placemark you create.
- On the Template sheet, you can optionally change the placemark
icon and border, background, and text colors at any time.
- On the Placemarks sheet, replace the sample data with your own
information for individual placemarks. There is space for up to 100 placemarks.
- Enter either a TimeStamp or TimeSpan for your
For single-date events: Under TimeStamp, enter a valid date/time under
For bounded time periods: Under TimeSpan, enter a date/time under
begin and end.
For unbounded time periods: Under TimeSpan, enter a date/time under
either begin or end.
Note: If you specify both TimeStamp and TimeSpan, the TimeSpan
overrides the TimeStamp.
Preview the KML
- Click the Publish tab at the upper right.
- Click Publish Now.
- From the What parts? drop-down list, select Sheet kml(!) only.
- Click Re-publish document.
- Click More publishing options at the bottom of the Publish tab.
- In the pop-up window, select:
- File format: TXT
- What sheets? Sheet "kml(!)" only
- What cells? A1
- Click Generate URL.
- Copy the generated URL, and then launch Google Earth.
Display Your Placemarks in Google Earth
- In Google Earth, select Network Link from the Add menu.
- In the Google Earth - New window, enter a name for the network link, paste the URL
into the Link field, and click OK.
Google Earth loads your KML from the published spreadsheet and displays your
Publish Your Changes
Whenever you make changes to the spreadsheet, click Re-publish
document on the Publish tab. Then reload the Network Link folder in Google
Earth you created in the previous step by right-clicking it and selecting
Refresh from the context menu.
Need More Control Over Time?
It is not currently possible to add or edit TimeStamps or TimeSpans in the Google Earth
user interface. So if you find that you need more control over time in your KML, you
can hand-edit your KML. See the TimeStamp and TimeSpan sections of the KML
Reference, and take a look at the Validating KML As
You Go tutorial.
Discussion / Feedback
Have questions about this tutorial? Want to give us some feedback? Visit the Google Earth
Outreach Discussion Group to discuss it with others.