向要素图层添加更多要素可以使用以下代码:
gis = GIS("url", "username", "password")
feature_layer = gis.content.get("item_id").layers[0]
new_feature = { "geometry": { "x": -118.4079, "y": 33.9434, "spatialReference": {"wkid": 4326} }, "attributes": { "FIELD_1": "Value 1", "FIELD_2": "Value 2", "FIELD_3": "Value 3" } }
feature_layer.edit_features(adds=[new_feature])