The following ImageServer layer:https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/SeaTemperature/ImageServer
Is it possible to display the data for a specific date (e.g., June 14, 2014) in a Flutter app using the ArcGIS Maps SDK?
If so, how can I set the time parameter to show data for that date only?
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 ); } }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.