Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Edit features with feature-linked annotation implementation #928

Merged
merged 75 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
1bbc6e3
Added foundation files
vquach2404 Jul 28, 2020
b140492
Added loudoun_anno geodatabase
vquach2404 Jul 28, 2020
3f27b13
Added all functions
vquach2404 Jul 30, 2020
1cc0da1
Updated view controller class
vquach2404 Jul 31, 2020
5f7979c
Fixed edit features alert
vquach2404 Aug 4, 2020
25daa78
Fixed text editing
vquach2404 Aug 4, 2020
c5abfcf
Moved geodatabase reference
vquach2404 Aug 4, 2020
63eddb2
Updated move point process
vquach2404 Aug 4, 2020
f9c430d
Added confirmation to move polyline process
vquach2404 Aug 4, 2020
6595fad
Updated comments
vquach2404 Aug 5, 2020
410084d
Guarded values
vquach2404 Aug 5, 2020
d95a628
Updated readme and metadata
vquach2404 Aug 5, 2020
b622150
Updated image, readme, metadata
vquach2404 Aug 5, 2020
150c59f
Merge branch 'v.next' into Viv/EditFeaturesWFeatureLinkedAnnotation_v…
vquach2404 Aug 5, 2020
ebae001
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 5, 2020
ec28ae4
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 5, 2020
e17badd
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 5, 2020
bd9df50
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 5, 2020
75c22ce
Updated readme
vquach2404 Aug 5, 2020
1477a26
Addressed suggestions
vquach2404 Aug 5, 2020
7d32ff9
Moved guard statement
vquach2404 Aug 5, 2020
844abee
Updated identify layers function
vquach2404 Aug 6, 2020
628651d
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 6, 2020
1bea262
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 6, 2020
db6599e
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 6, 2020
a7f6637
Updated wording in readme
vquach2404 Aug 7, 2020
a6abbbc
Moved mapView touch delegate
vquach2404 Aug 7, 2020
3d90888
Removed extra period
vquach2404 Aug 7, 2020
102f493
Array method changed
vquach2404 Aug 7, 2020
0a98c0c
Removed extra self
vquach2404 Aug 7, 2020
5616824
Added extra space
vquach2404 Aug 7, 2020
ced713b
Used contains(where:)
vquach2404 Aug 7, 2020
ee87d0a
Removed extra self
vquach2404 Aug 7, 2020
50b3f0d
Removed extra self
vquach2404 Aug 7, 2020
047b9b6
Removed extra self
vquach2404 Aug 7, 2020
b769a2c
Moved geodatabase and used compact map function
vquach2404 Aug 7, 2020
687a310
Edited clear selection
vquach2404 Aug 7, 2020
f44e3cb
Fixed moving polyline issue
vquach2404 Aug 10, 2020
7d8adda
Renamed movePolylineVertex
vquach2404 Aug 11, 2020
adca625
Fixed map view top constraint
vquach2404 Aug 11, 2020
28ed1b8
Changed geoview to an extension
vquach2404 Aug 11, 2020
8acbd7e
Removed selectedFeatureIsPolyline
vquach2404 Aug 11, 2020
626b004
Renamed selecteFeature function
vquach2404 Aug 11, 2020
d6df63f
Renamed movePoint
vquach2404 Aug 11, 2020
b1c24f4
Reworded alerts
vquach2404 Aug 11, 2020
525fb35
Strongly captured completion handlers
vquach2404 Aug 11, 2020
9d039ab
Updated function name
vquach2404 Aug 11, 2020
6ec649c
Used configuration handlers for text fields
vquach2404 Aug 11, 2020
18455f7
Updated readme and stored cancellable
vquach2404 Aug 11, 2020
a677b6e
Added text field observers
vquach2404 Aug 11, 2020
c83bfcb
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 12, 2020
e875a4f
Removed extra self
vquach2404 Aug 12, 2020
3bb2e94
Removed extra space
vquach2404 Aug 12, 2020
bab6b69
Changed forEach to for loop
vquach2404 Aug 13, 2020
8ccc75f
Merge branch 'v.next' into Viv/EditFeaturesWFeatureLinkedAnnotation_v…
vquach2404 Aug 13, 2020
c053871
Updated PortalItems
vquach2404 Aug 17, 2020
da20a90
Checked out geodatabase
vquach2404 Aug 17, 2020
869f84d
Updated readme
vquach2404 Aug 18, 2020
57870a4
Changed guard to if else
vquach2404 Aug 18, 2020
3c06c10
Updated text fields
vquach2404 Aug 18, 2020
72ff77b
Renamed identifyLayers
vquach2404 Aug 18, 2020
c76ec79
Updated comments
vquach2404 Aug 18, 2020
638ebd9
Updated geodatabase property
vquach2404 Aug 18, 2020
15405a5
Updated shorthand in load function
vquach2404 Aug 18, 2020
a9ac96f
Moved geodatabase
vquach2404 Aug 19, 2020
1823f30
Fix geodatabase directory issue.
yo1995 Aug 20, 2020
686e98c
Removed extra return
vquach2404 Aug 20, 2020
326e604
Update arcgis-ios-sdk-samples/Edit data/Edit features with feature-li…
vquach2404 Aug 20, 2020
cb74b98
Removed observer in cancel
vquach2404 Aug 20, 2020
7683d24
Renamed selectFeature
vquach2404 Aug 20, 2020
67e3fd2
Moved textFieldObserver
vquach2404 Aug 20, 2020
7aa83d5
Polish readme
vquach2404 Aug 24, 2020
b94fcc6
Added line breaks
vquach2404 Aug 24, 2020
8a9fa2f
Changed spacing
vquach2404 Aug 24, 2020
ae816e6
Updated load geodatabase
vquach2404 Aug 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated readme and metadata
  • Loading branch information
vquach2404 committed Aug 5, 2020
commit d95a62885f74d2c8109a66c83c4b1a5fed56c634
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ Annotation is useful for displaying text that you don't want to move or resize w

## How to use the sample

Pan and zoom the map to see that the text on the map is annotation, not labels. Tap one of the address points to update the house number (AD_ADDRESS) and street name (ST_STR_NAM). Tap one of the dashed parcel polylines and tap another location to change its geometry. NOTE: Selection is only enabled for points and straight (single segment) polylines.

The feature-linked annotation will update accordingly.
Pan and zoom the map to see that the text on the map is annotation, not labels. Tap one of the address points to update the house number (AD_ADDRESS) and street name (ST_STR_NAM). Tap one of the dashed parcel polylines and tap another location to change its geometry. NOTE: Selection is only enabled for points and straight (single segment) polylines. The feature-linked annotation will update accordingly.

## How it works

1. Load the geodatabase. NOTE: Read/write geodatabases should normally come from a `GeodatabaseSyncTask`, but this has been omitted here. That functionality is covered in the sample *Generate geodatabase*.
2. Create `FeatureLayer`s from geodatabase feature tables found in the geodatabase with `geodatabase.geodatabaseFeatureTables`.
3. Create `AnnotationLayer`s from geodatabase feature tables found in the geodatabase with `geodatabase.geodatabaseAnnotationTables`.
4. Add the `FeatureLayer`s and `AnnotationLayer`s to the map's operational layers.
5. Use a `DefaultMapViewOnTouchListener` to listen for taps on the map to either select address points or parcel polyline features. NOTE: Selection is only enabled for points and straight (single segment) polylines.
* For the address points, a dialog is opened to allow editing of the address number (AD_ADDRESS) and street name (ST_STR_NAM) attributes.
1. Load the geodatabase using `AGSLoadable.load(completion:)`. NOTE: Read/write geodatabases should normally come from an `AGSGeodatabaseSyncTask`, but this has been omitted here.
2. Create `AGSFeatureLayer`s from the geodatabase's array of feature tables.
3. Create `AGSAnnotationLayer`s from the feature tables.
4. Add the `AGSFeatureLayer`s and `AGSAnnotationLayer`s to the map's operational layers.
5. Use `geoView(_:didTapAtScreenPoint:mapPoint:)` track taps on the map to either select address points or parcel polyline features. NOTE: Selection is only enabled for points and straight (single segment) polylines.
* For the address points, an alert is opened to allow editing of the address number (AD_ADDRESS) and street name (ST_STR_NAM) attributes.
* For the parcel lines, a second tap will change one of the polyline's vertices.

Both expressions were defined by the data author in ArcGIS Pro using [the Arcade expression language](https://developers.arcgis.com/arcade/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"AGSFeatureLayer",
"AGSGeodatabase"
],
"redirect_from": "/ios/latest/swift/sample-code/edit-features-connected-.htm",
"redirect_from": [],
"relevant_apis": [
"AGSAnnotationLayer",
"AGSFeature",
Expand Down