Function add(_:to:gdbVersion:)
public func add(
_ features: [AGKFeature],
to id: String,
gdbVersion: String? = nil
)
Adds features to the FeatureLayer with the id of id.
To add a feature to the first layer, you could write:
let layers = try await myFeatureServer
.query(layerQueries: [.init(whereClause: "1=1", layerID: "0")])
var attributes = JSON()
attributes["Greeting"] = "Hi!"
let feature = Feature(geometry: Geometry(x: 0.0, y: 0.0, rings: nil), attributes: attributes)
let res = try await myFeatureServer.add([feature], to: "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 add features to. |
Throws
AGKRequestError
Returns
[EditResponse].