Skip to content

Commit e4f0546

Browse files
Merge pull request #99 from Esri/PaulAllanSturm/addFeatureLayerWithTimeOffset
Add feature layer with time offset
2 parents c2d8fe6 + ff10fcb commit e4f0546

File tree

6 files changed

+382
-5
lines changed

6 files changed

+382
-5
lines changed

assets/generated_samples_list.json

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,37 @@
3333
"title": "Add feature collection layer from table",
3434
"key": "add_feature_collection_layer_from_table"
3535
},
36+
"add_feature_layer_with_time_offset": {
37+
"category": "Maps",
38+
"description": "Display a time-enabled feature layer with a time offset.",
39+
"ignore": false,
40+
"images": [
41+
"add_feature_layer_with_time_offset.png"
42+
],
43+
"keywords": [
44+
"change",
45+
"range",
46+
"time",
47+
"time extent",
48+
"time offset",
49+
"time-aware",
50+
"time-enabled",
51+
"ArcGISMapViewController",
52+
"FeatureLayer",
53+
"TimeExtent"
54+
],
55+
"redirect_from": [],
56+
"relevant_apis": [
57+
"ArcGISMapViewController",
58+
"FeatureLayer",
59+
"TimeExtent"
60+
],
61+
"snippets": [
62+
"add_feature_layer_with_time_offset_sample.dart"
63+
],
64+
"title": "Add feature layer with time offset",
65+
"key": "add_feature_layer_with_time_offset"
66+
},
3667
"add_feature_layers": {
3768
"category": "Layers",
3869
"description": "Display feature layers from various data sources.",
@@ -71,7 +102,9 @@
71102
"category": "Maps",
72103
"description": "Display a layer from an ArcGIS map image layer service.",
73104
"ignore": false,
74-
"images": [],
105+
"images": [
106+
"add_map_image_layer.png"
107+
],
75108
"keywords": [
76109
"display",
77110
"image",
@@ -675,11 +708,37 @@
675708
"category": "Routing and Logistics",
676709
"description": "Find routes from several locations to the respective closest facility.",
677710
"ignore": false,
678-
"images": [],
679-
"keywords": [],
711+
"images": [
712+
"find_closest_facility_from_point.png"
713+
],
714+
"keywords": [
715+
"incident",
716+
"network analysis",
717+
"route",
718+
"search",
719+
"ClosestFacilityParameters",
720+
"ClosestFacilityResult",
721+
"ClosestFacilityRoute",
722+
"ClosestFacilityTask",
723+
"Facility",
724+
"Graphic",
725+
"GraphicsOverlay",
726+
"Incident"
727+
],
680728
"redirect_from": [],
681-
"relevant_apis": [],
682-
"snippets": [],
729+
"relevant_apis": [
730+
"ClosestFacilityParameters",
731+
"ClosestFacilityResult",
732+
"ClosestFacilityRoute",
733+
"ClosestFacilityTask",
734+
"Facility",
735+
"Graphic",
736+
"GraphicsOverlay",
737+
"Incident"
738+
],
739+
"snippets": [
740+
"find_closest_facility_from_point_sample.dart"
741+
],
683742
"title": "Find closest facility from point",
684743
"key": "find_closest_facility_from_point"
685744
},

lib/models/samples_widget_list.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:arcgis_maps_sdk_flutter_samples/samples/add_feature_collection_layer_from_table/add_feature_collection_layer_from_table_sample.dart';
2+
import 'package:arcgis_maps_sdk_flutter_samples/samples/add_feature_layer_with_time_offset/add_feature_layer_with_time_offset_sample.dart';
23
import 'package:arcgis_maps_sdk_flutter_samples/samples/add_feature_layers/add_feature_layers_sample.dart';
34
import 'package:arcgis_maps_sdk_flutter_samples/samples/add_map_image_layer/add_map_image_layer_sample.dart';
45
import 'package:arcgis_maps_sdk_flutter_samples/samples/add_tiled_layer/add_tiled_layer_sample.dart';
@@ -46,6 +47,7 @@ import 'package:flutter/material.dart';
4647
const sampleWidgets = <String, Widget>{
4748
'add_feature_collection_layer_from_table':
4849
AddFeatureCollectionLayerFromTableSample(),
50+
'add_feature_layer_with_time_offset': AddFeatureLayerWithTimeOffsetSample(),
4951
'add_feature_layers': AddFeatureLayersSample(),
5052
'add_map_image_layer': AddMapImageLayerSample(),
5153
'add_tiled_layer': AddTiledLayerSample(),
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Add feature layer with time offset
2+
3+
Display a time-enabled feature layer with a time offset.
4+
5+
![Image of add feature layer with time offset](add_feature_layer_with_time_offset.png)
6+
7+
## Use case
8+
9+
You can use a time offset to compare time periods by displaying them overlaid on the map. For example, you could show a feature layer with flu cases from December overlaid with flu cases from January to visualize the spread of the disease over time.
10+
11+
## How to use the sample
12+
13+
When the sample loads, you'll see hurricane tracks visualized in red and blue. The red hurricane tracks occurred 10 days before the tracks displayed in blue. Adjust the slider to move the interval to visualize how storms progress over time.
14+
15+
## How it works
16+
17+
1. Create a feature layer for displaying the non-offset features and apply symbology to it.
18+
2. Create a second feature layer referring to the same service. Apply a 10 day time offset and unique symbology. Features displayed from this layer will have time values 10 days earlier than the values in the non-offset layer.
19+
3. Apply a 10-day time extent to the map view, starting at the beginning of the data range.
20+
4. When the user adjusts the slider, move the time extent. Both feature layers will filter their content for the map view's time extent.
21+
22+
## Relevant API
23+
24+
* ArcGISMapViewController
25+
* FeatureLayer
26+
* TimeExtent
27+
28+
## About the data
29+
30+
The sample uses a time-enabled feature service depicting [hurricanes in the year 2000](https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/0).
31+
32+
## Tags
33+
34+
change, range, time, time extent, time offset, time-aware, time-enabled
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"category": "Maps",
3+
"description": "Display a time-enabled feature layer with a time offset.",
4+
"ignore": false,
5+
"images": [
6+
"add_feature_layer_with_time_offset.png"
7+
],
8+
"keywords": [
9+
"change",
10+
"range",
11+
"time",
12+
"time extent",
13+
"time offset",
14+
"time-aware",
15+
"time-enabled",
16+
"ArcGISMapViewController",
17+
"FeatureLayer",
18+
"TimeExtent"
19+
],
20+
"redirect_from": [],
21+
"relevant_apis": [
22+
"ArcGISMapViewController",
23+
"FeatureLayer",
24+
"TimeExtent"
25+
],
26+
"snippets": [
27+
"add_feature_layer_with_time_offset_sample.dart"
28+
],
29+
"title": "Add feature layer with time offset"
30+
}
300 KB
Loading

0 commit comments

Comments
 (0)