2

I'm trying to write a timelapse function in Google Earth Engine, but the standard JavaScript setTimeout (which I'm using to set a delay between frames) does not appear to work, as it complains about it not being defined in this scope (I imagine the API does not access the DOM the same way a webpage would). I have a video export function that works, but I'm also trying to render something like this in-engine.

Is there some way to essentially tell GEE to wait, or something analogous to the setTimeout js function that I'm overlooking?

3
  • 1
    What is your actual question? If you have code that illustrates an issue, please include it with the question. Commented Aug 5, 2017 at 21:30
  • Access to the DOM is limited. Why are you trying to render it in EE if Export works?
    – intotecho
    Commented Aug 7, 2017 at 6:30
  • My client wants to be able to do this in-engine, they don't like the constraints that come with an exported video. What functions or methods could I use to achieve a time delay between frames, or how might I write such a function myself?
    – user103230
    Commented Aug 10, 2017 at 15:55

1 Answer 1

1

You're not allowed to use setTimeout in the code editor.

But also, you probably don't really want to do it that way; since there's no guarantee that any backend requests (like Map.addLayer) will process in a consistent amount of time.

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.