I have been struggling to add a timeline tool to a time-lapse video I put together on GEE. The last part of my code is:

var polygon = ee.Geometry.Rectangle([-XX,-XX,-XX,-XX]); //xMin, yMin, xMax, yMax.

var videoArgs = {
  collection: collection,
  description: 'VideoExample',
  dimensions: 600,
  framesPerSecond: 10,
  region: polygon


How would it be possible to add a timeline tool to the video representing the changes over time for my collection?

How can I pass the date of each image to the timeline tool and then to the video?


1 Answer 1


To add timestamps to timelapse, you need to add text overlays to each frame using the example from here. It is based on gena's textoverlay package.

To import that package use :var text = require('users/gena/packages:text').

Then create a function that adds a property called label to each image in your stack with the timestamp of your choice. Finally, print/export your videoThumbURL as usual.

Link to complete working example is here. The base visualization was obtained from the Image Visualization documentation. The result of the working example is provided below.

enter image description here

The text is pixelated since Earth Engine doesn't inherently support text elements in its Map environment. So the package is a workaround to create image elements that look like text.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.