addFeatures

addFeatures

addFeatures(requestOptionsIAddFeaturesOptions): Promise<{ addResults: IEditFeatureResult[] }>

Add features request. See the REST Documentation for more information.

Use dark colors for code blocksCopy
          
1
2
3
4
5
6
7
8
9
10
import { addFeatures } from '@esri/arcgis-rest-feature-service';
//
addFeatures({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
  features: [{
    geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },
    attributes: { status: "alive" }
  }]
})
  .then(response)
Parameters
ParameterTypeNotes
requestOptions
IAddFeaturesOptions

Options for the request.

Returns 
Promise<{ addResults: IEditFeatureResult[] }>

A Promise that will resolve with the addFeatures response.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.