Function update(_:in:gdbVersion:)
public func update(
_ features: [AGKFeature],
in id: String,
gdbVersion: String? = nil
)
Updates features
in the FeatureLayer
with the id of id
.
To change the value of Greeting
to "Hi!", you could write:
let layers = try await myFeatureServer
.query(layerQueries: [.init(whereClause: "1=1", layerID: "0")])
var feature = layers[0].features[0]
feature.attributes!["Greeting"] = "Hi!"
let res = try await myFeatureServer.update([feature], in: "0")
Parameters
Name | Type | Description |
---|---|---|
features | [AGKFeature] |
The |
id | String |
The ID of the |
gdbVersion | String? |
The version of the geo-database you want to update features in. |
Throws
AGKRequestError
Returns
[EditResponse]
.