Hi,
You can display the data for a specific date by setting MapViewController.timeExtent. Here are some codes for your reference:
Future<void> onMapViewReady() async{
_imageServiceRaster = ImageServiceRaster(
uri: Uri.parse(
'https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/SeaTemperature/ImageServer',
),
);
_imageServiceLayer = RasterLayer.withRaster(_imageServiceRaster);
await _imageServiceLayer.load();
_fullTimeExtent = _imageServiceLayer.fullTimeExtent!;
final map = ArcGISMap.withBasemapStyle(BasemapStyle.arcGISOceansLabels);
map.operationalLayers.add(_imageServiceLayer);
map.initialViewpoint = Viewpoint.fromTargetExtent(
_imageServiceLayer.fullExtent!,
);
_mapViewController.arcGISMap = map;
}
// Update the map's time extent based on the slider value
void updateTimeExtent(double value) {
final startTime = _fullTimeExtent?.startTime?.add(Duration(days: value.round()));
if (startTime != null) {
_mapViewController.timeExtent = TimeExtent(
startTime: startTime,
endTime: startTime.add(const Duration(days: 10)),// Set a fixed time window of 10 days for demonstration
);
}
}