getDistinctTimestamps method

Future<List<DateTime>> getDistinctTimestamps()

Returns a sorted collection of distinct timestamps of all rasters that participate in the mosaic dataset.

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 GeoViewController.timeExtent for each timestamp.

This method requires the data to be published with a single time field defined in ArcGIS Pro. Returns an empty array if time information is not available.

Return Value: The mosaic dataset distinct timestamps sorted in ascending order.