Method GetDistinctTimestampsAsync
GetDistinctTimestampsAsync(CancellationToken)
Returns a sorted collection of distinct timestamps of all rasters that participate in the mosaic dataset.
Declaration
public Task<IReadOnlyList<DateTimeOffset>> GetDistinctTimestampsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<DateTimeOffset>> | The mosaic dataset distinct timestamps sorted in ascending order. |
Remarks
An effective time slider experience requires a relatively uniform distribution of data over a given time range.
Data with irregular or inconsistent date distributions may have gaps that lack valid rasters for certain
time ranges, or periods where many rasters are displayed at once. For data that's not well-suited to a time
slider, you may choose to implement a UI that steps the user through each raster in
the mosaic dataset in chronological order. Call this method to get all distinct timestamps in the dataset (in
ascending order) and set the GeoView.TimeExtent for each timestamp.
This method requires the data to be published with a single time field defined in ArcGIS Pro. Returns an empty collection if time information is not available.
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET | 300.2 |
| .NET Windows | 300.2 |
| .NET Android | 300.2 |
| .NET iOS | 300.2 |