Skip to content

Commit 8081b48

Browse files
Merge commit '48a737010a850067daef0b873cb67b77d2c9bf97' into PaulAllanSturm/showDeviceLocation
* commit '48a737010a850067daef0b873cb67b77d2c9bf97': Apply Common Design to Add Feature Collection Layer from Table Sample (#89) Set Basemap Sample (#76) Update lib/samples/authenticate_with_token/README.md Update lib/samples/authenticate_with_token/README.md Update lib/samples/authenticate_with_token/README.md Apply Common Design to Download Preplanned Map Area Sample (#81) Assorted cosmetic fixes revise REDME and Remove status listener screenshot cleanup comments and cleanup login dialog follow the common design to revise the sample attempt to load secure map "Authenticate with token" sample
2 parents 0b2d07a + 48a7370 commit 8081b48

26 files changed

+1153
-334
lines changed

assets/generated_samples_list.json

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,33 @@
33
"category": "Layers",
44
"description": "Create a Feature Collection Layer from a Feature Collection Table, and add it to a map.",
55
"ignore": false,
6-
"images": [],
7-
"keywords": [],
6+
"images": [
7+
"add_feature_collection_layer_from_table.png"
8+
],
9+
"keywords": [
10+
"collection",
11+
"feature",
12+
"layers",
13+
"table",
14+
"Feature",
15+
"FeatureCollection",
16+
"FeatureCollectionLayer",
17+
"FeatureCollectionTable",
18+
"Field",
19+
"SimpleRenderer"
20+
],
821
"redirect_from": [],
9-
"relevant_apis": [],
10-
"snippets": [],
22+
"relevant_apis": [
23+
"Feature",
24+
"FeatureCollection",
25+
"FeatureCollectionLayer",
26+
"FeatureCollectionTable",
27+
"Field",
28+
"SimpleRenderer"
29+
],
30+
"snippets": [
31+
"add_feature_collection_layer_from_table_sample.dart"
32+
],
1133
"title": "Add feature collection layer from table",
1234
"key": "add_feature_collection_layer_from_table"
1335
},
@@ -275,6 +297,41 @@
275297
"title": "Authenticate with OAuth",
276298
"key": "authenticate_with_oauth"
277299
},
300+
"authenticate_with_token": {
301+
"category": "Cloud and Portal",
302+
"description": "Access a web map that is secured with ArcGIS token-based authentication.",
303+
"ignore": false,
304+
"images": [
305+
"authenticate_with_token.png"
306+
],
307+
"keywords": [
308+
"authentication",
309+
"cloud",
310+
"portal",
311+
"remember",
312+
"security",
313+
"ArcGISAuthenticationChallengeHandler",
314+
"ArcGISMap",
315+
"ArcGISMapView",
316+
"AuthenticationManager",
317+
"Portal",
318+
"PortalItem"
319+
],
320+
"redirect_from": [],
321+
"relevant_apis": [
322+
"ArcGISAuthenticationChallengeHandler",
323+
"ArcGISMap",
324+
"ArcGISMapView",
325+
"AuthenticationManager",
326+
"Portal",
327+
"PortalItem"
328+
],
329+
"snippets": [
330+
"authenticate_with_token_sample.dart"
331+
],
332+
"title": "Authenticate with token",
333+
"key": "authenticate_with_token"
334+
},
278335
"create_mobile_geodatabase": {
279336
"category": "Edit and Manage Data",
280337
"description": "Create and share a mobile geodatabase.",
@@ -464,11 +521,31 @@
464521
"category": "Edit and Manage Data",
465522
"description": "Take a map offline using a preplanned map area.",
466523
"ignore": false,
467-
"images": [],
468-
"keywords": [],
524+
"images": [
525+
"download_preplanned_map_area.png"
526+
],
527+
"keywords": [
528+
"map area",
529+
"offline",
530+
"pre-planned",
531+
"preplanned",
532+
"DownloadPreplannedOfflineMapJob",
533+
"DownloadPreplannedOfflineMapParameters",
534+
"DownloadPreplannedOfflineMapResult",
535+
"OfflineMapTask",
536+
"PreplannedMapArea"
537+
],
469538
"redirect_from": [],
470-
"relevant_apis": [],
471-
"snippets": [],
539+
"relevant_apis": [
540+
"DownloadPreplannedOfflineMapJob",
541+
"DownloadPreplannedOfflineMapParameters",
542+
"DownloadPreplannedOfflineMapResult",
543+
"OfflineMapTask",
544+
"PreplannedMapArea"
545+
],
546+
"snippets": [
547+
"download_preplanned_map_area_sample.dart"
548+
],
472549
"title": "Download preplanned map area",
473550
"key": "download_preplanned_map_area"
474551
},

lib/models/samples_widget_list.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:arcgis_maps_sdk_flutter_samples/samples/apply_scheduled_updates_
88
import 'package:arcgis_maps_sdk_flutter_samples/samples/apply_simple_renderer_to_feature_layer/apply_simple_renderer_to_feature_layer_sample.dart';
99
import 'package:arcgis_maps_sdk_flutter_samples/samples/apply_unique_value_renderer/apply_unique_value_renderer_sample.dart';
1010
import 'package:arcgis_maps_sdk_flutter_samples/samples/authenticate_with_oauth/authenticate_with_oauth_sample.dart';
11+
import 'package:arcgis_maps_sdk_flutter_samples/samples/authenticate_with_token/authenticate_with_token_sample.dart';
1112
import 'package:arcgis_maps_sdk_flutter_samples/samples/create_mobile_geodatabase/create_mobile_geodatabase_sample.dart';
1213
import 'package:arcgis_maps_sdk_flutter_samples/samples/create_planar_and_geodetic_buffers/create_planar_and_geodetic_buffers_sample.dart';
1314
import 'package:arcgis_maps_sdk_flutter_samples/samples/densify_and_generalize_geometry/densify_and_generalize_geometry_sample.dart';
@@ -55,6 +56,7 @@ const sampleWidgets = <String, Widget>{
5556
ApplySimpleRendererToFeatureLayerSample(),
5657
'apply_unique_value_renderer': ApplyUniqueValueRendererSample(),
5758
'authenticate_with_oauth': AuthenticateWithOAuthSample(),
59+
'authenticate_with_token': AuthenticateWithTokenSample(),
5860
'create_mobile_geodatabase': CreateMobileGeodatabaseSample(),
5961
'create_planar_and_geodetic_buffers': CreatePlanarAndGeodeticBuffersSample(),
6062
'densify_and_generalize_geometry': DensifyAndGeneralizeGeometrySample(),
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Add feature collection layer from table
2+
3+
Create a Feature Collection Layer from a Feature Collection Table, and add it to a map.
4+
5+
![Image of add feature collection layer from table](add_feature_collection_layer_from_table.png)
6+
7+
## Use case
8+
9+
A Feature Collection allows easily importing external data (such as CSV files), as well as creating custom schema for data that is in non-standardized format. This data can then be used to populate a Feature Collection Table, and displayed in a Feature Collection Layer using the attributes and geometries provided in the external data source. For example, an electricity supplier could use this functionality to visualize existing location data of coverage areas (polygons), power stations (points), transmission lines (polylines), and others.
10+
11+
## How to use the sample
12+
13+
When launched, this sample displays a `FeatureCollectionLayer` with a `ArcGISPoint`, `Polyline` and `Polygon` geometry. Pan and zoom to explore the scene.
14+
15+
## How it works
16+
17+
1. Create a `FeatureCollectionTable` for the `GeometryType`s `ArcGISPoint`, `Polyline`, and `Polygon`, using `FeatureCollectionTable(fields, geometryType, spatialReference)`, passing in a list of `Field` objects to represent the table's schema, the `GeometryType`, and a `SpatialReference`.
18+
2. Assign a `SimpleRenderer` to each table to render any `Feature`s from that table using the `Symbol` that was set.
19+
3. Use the `FeatureCollectionTable.createFeature(attributes, geometry)` method to create a feature from the feature collection table, passing an attribute and geometry for that feature.
20+
4. Add new features to the table, `FeatureCollectionTable.addFeature(feature)`.
21+
5. Add the feature collection table to the feature collection, `FeatureCollection.tables.add(featureCollectionTable)`.
22+
6. Create a `FeatureCollectionLayer` using the feature collection, `FeatureCollectionLayer.withFeatureCollection(featureCollection)`.
23+
7. Add the feature collection layer to the map, `ArcGISMap.operationalLayers.add(featureCollectionLayer)`.
24+
25+
## Relevant API
26+
27+
* Feature
28+
* FeatureCollection
29+
* FeatureCollectionLayer
30+
* FeatureCollectionTable
31+
* Field
32+
* SimpleRenderer
33+
34+
## Tags
35+
36+
collection, feature, layers, table

lib/samples/add_feature_collection_layer_from_table/README.metadata.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,32 @@
22
"category": "Layers",
33
"description": "Create a Feature Collection Layer from a Feature Collection Table, and add it to a map.",
44
"ignore": false,
5-
"images": [],
6-
"keywords": [],
5+
"images": [
6+
"add_feature_collection_layer_from_table.png"
7+
],
8+
"keywords": [
9+
"collection",
10+
"feature",
11+
"layers",
12+
"table",
13+
"Feature",
14+
"FeatureCollection",
15+
"FeatureCollectionLayer",
16+
"FeatureCollectionTable",
17+
"Field",
18+
"SimpleRenderer"
19+
],
720
"redirect_from": [],
8-
"relevant_apis": [],
9-
"snippets": [],
21+
"relevant_apis": [
22+
"Feature",
23+
"FeatureCollection",
24+
"FeatureCollectionLayer",
25+
"FeatureCollectionTable",
26+
"Field",
27+
"SimpleRenderer"
28+
],
29+
"snippets": [
30+
"add_feature_collection_layer_from_table_sample.dart"
31+
],
1032
"title": "Add feature collection layer from table"
1133
}
275 KB
Loading

0 commit comments

Comments
 (0)