Layers
You can import and publish data using data management tools to create hosted layers and services in ArcGIS. Once created, you can access the layers and services using the feature service package from ArcGIS REST JS to return metadata, make queries, edit features, and perform other operations.
To learn more about how to host your data as services, visit Data hosting in the Mapping APIs and location services guide.
Workflow
The general workflow to work with the helper methods from the feature service package is to:
- Import your data from a CSV, XLS, GeoJSON, or Shapefile file to create a hosted feature layer. See Import data as a feature layer.
- Get the URL for the feature layer. See Access feature layer data.
- Make a request to the service.
Access feature layer data
To access feature layer data, you use the get
operation and the feature layer URL to access the metadata.
Example
To learn more, go to the Get layer metadata tutorial.
Query features
With the service URL from a published hosted feature layer, you can use the query
function to perform either SQL or spatial queries against the feature service.
Example
This example demonstrates how to perform a SQL query against a feature service.
To learn more, go to the Query a feature layer (SQL) tutorial.
Edit features
You can add, update, and delete features from a feature layer using add
, update
, and delete
.
Example
This example shows how to add features to a feature layer.
To learn more, go to the Edit feature data tutorial.
Tutorials
Get layer metadata
Query a feature layer (SQL)
Query a feature layer (spatial)
Edit feature data
Add, update, and delete data in a hosted feature layer.