Using SDK version 4.32 map components. Using a caclite date picker to update the time extent on the map.
Updating the time extent on the map component does not update the time extent on the featurelayers within the webmap. Updating the time extent on the layers within the webmap via the layer collection does update the map.
Here's the codepen - https://codepen.io/derekwmiller/pen/myyKryd
JS code on lines 110 - 113 does not work. JS code on lines 115 - 124 (commented out) works.
What am I missing?
Solved! Go to Solution.
You’re seeing this behavior because all operational layers in your web map have timeAnimation set to false as seen here. As a result, setting the map component’s timeExtent has no effect on layers. Each time aware layer is effectively ignoring the time extent since their useViewTime property is also set to false.
To enable time-based rendering, you need to explicitly set the useViewTime property to true for each layer after the map has finished loading. This ensures the layers respect the map component's timeExtent. Here is a simplified version of your app working: https://codepen.io/U_B_U/pen/oggyWyW?editors=0010
You’re seeing this behavior because all operational layers in your web map have timeAnimation set to false as seen here. As a result, setting the map component’s timeExtent has no effect on layers. Each time aware layer is effectively ignoring the time extent since their useViewTime property is also set to false.
To enable time-based rendering, you need to explicitly set the useViewTime property to true for each layer after the map has finished loading. This ensures the layers respect the map component's timeExtent. Here is a simplified version of your app working: https://codepen.io/U_B_U/pen/oggyWyW?editors=0010
Thank you for catching my error. This solved the issue.