- See also:
Method Overview
Name | Return Type | Summary | Object | |
---|---|---|---|---|
Promise<TimeExtent> | more details Returns the time extent of all layers. | more details | timeUtils |
Method Details
-
getTimeExtentFromLayers(layers, signal){Promise<TimeExtent>}
-
Returns the time extent of all layers.
Parameters:layers Layer[]|Collection<Layer>An array or collection of layers to compute a time extent from.
signal AbortSignalAbortSignal allows for cancelable requests. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.Returns:Type Description Promise<TimeExtent> Returns a promise that resolves to a TimeExtent. Examples:// Get the time extent of all layers in the view. const fullTimeExtent = await getTimeExtentFromLayers(view.map.allLayers);
// Get the time extent from an array of layers. const timeExtent = await getTimeExtentFromLayers([ earthquakes, emergencyCalls ]);