Create a new feature layer
Learn how to create a new hosted feature layer and feature service.
You can use tools in your developer dashboard and ArcGIS Online to define a new dataset in the cloud as a hosted feature layer. A hosted feature layer is also referred to as a feature layer. A feature layer is used to store point, line, or polygon geometries with attributes. After a feature layer is created, applications can access it by ID or URL and then query, edit, and display features.
In this tutorial, you use the Create data tool in your developer dashboard to create and define a new feature layer that can store points with attributes. You also use Map Viewer to add new features and set field values.
Prerequisites
You need an ArcGIS account to access your dashboard and manage hosted layers. Sign up for an account for free.
Steps
Create a point feature layer
Use data management tools to create a point feature layer that is powered by a feature service. The feature service will contain point geometries and attributes.
Sign in to your developer account.
In the developer dashboard, click Layers > Create data > New hosted layer (Feature layer).
In the Data Structure pane, set the Geometry type to:
Point
.Under Fields, click Add field to create the following fields for the layer of the point layer:
Create the following fields in the Fields window:
- Field 1
- Name:
id
- Alias:
id
- Type:
Integer
- Click: Add field
- Name:
- Field 2
- Name:
name
- Alias:
name
- Type:
String
- Click: Add field
- Name:
- Field 3
- Name:
rating
- Alias:
rating
- Type:
string
- Click: Add Field
- Name:
- Click Next to continue.
- Field 1
In the Item Details pane, set the following properties:
- Title:
My Points
- Tags:
Beach access
. The Tags property cannot be left blank. - Description:
Place points along the California coast line
- Title:
Click Create Layer to create the new My Points feature layer and feature service.
In the item page, click the Settings tab.
Under Layer access (Sharing), ensure that People with access is set to Public (authentication not required).
Find the hosted layer ID and URL
Your Layer ID and service URL will be unique. To access the feature layer directly, reference the layer by its index. For example, the layer's index is 0: https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/my_points/FeatureServer/0
.
- In the Overview, find the Layer ID and Service URL. It should look something like this:
- Layer ID:
70264c2e37784a819e235d3a0129832f
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/my_points/FeatureServer
- Layer ID:
Enable editing
To add, update, and delete features in your feature layer, you need to enable editing.
In the Settings, find Editing settings.
Check Allow others to edit and leave the default selections.
Click Save settings.
Go to ArcGIS Online and sign in.
In the top navigation bar, click Content.
Click Create > Feature Layer > Build a layer.
Click Points > Create.
Ensure that Point layer is checked > Next > Next.
Set the following properites:
- Title:
My Points
- Tags:
Beach access
: The Tags property cannot be left blank. - Click Done.
- Title:
In the item page, click Share > Everyone(public) > Save.
Add data
In the item page, click the Data tab > Fields > Add.
Create the following fields in the Fields window:
- Field 1
- Name:
id
- Alias:
id
- Type:
Integer
- Click: Add New Field
- Name:
- Field 2
- Click Add.
- Name:
name
- Alias:
name
- Type:
String
- Click: Add New Field
- Field 3
- Click Add
- Name:
rating
- Alias:
rating
- Type:
string
- Click: Add Field
- Field 1
Find the hosted layer ID and URL
Your Layer ID and service URL will be unique. To access the feature layer directly, reference the layer by its index. For example, the layer's index is 0: https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/my_points/FeatureServer/0
.
In the item page, click the Overview tab. Scroll down to find the service URL. For example:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/my_points/FeatureServer
Click View to access the metadata for the feature layer. Find the Service ItemId. For example:
70264c2e37784a819e235d3a0129832f
.
Add features with Map Viewer
Map Viewer can be used to add and edit feature layer data. Use it to position the map to the Santa Monica mountains and then add new point features interactively.
Open Map Viewer.
Sign in to your account.
In the left panel, click Layers > Add Layer > My Points > Add to Map.
On the right panel, click Search. Type in
34.01757,-118.82549
and zoom to Zuma Beach.On the bottom of the right panel, click Edit to open the editor.
In the Editor, click Add feature to create a new point. Set the following attribute values:
- id:
1
- name:
Zuma Beach
- rating:
Good
- Click Add
- id:
Input the next coordinate into Search for Westward Beach:
34.00637,-118.812791
- id:
2
- name:
Westward Beach
- rating:
Excellent
- Click Add
- id:
Enter the last coordinate into Search for Point Dume County Beach:
34.00339,-118.80485
- id:
3
- name:
Point Dume County Beach
- rating:
Poor
- Click Add
- id:
In the left panel, click Save to save the new point features.
In the left panel, find Layers > My Points > ... > Show table to see the attribute data in relation to your map. This opens the table view that you can use to inspect and edit the data.
You now have a hosted feature layer and feature service. You can access the hosted layer with its URL or layer ID in your applications. To manage your hosted layer properties and capabilities, visit the Manage a feature layer tutorial.
What's Next?
Learn how to use additional tools, APIs, and location services in these tutorials:

Import data as a feature layer
Use data management tools to import and create hosted feature layers.

Access feature layer data
Use ArcGIS Online tools to access and display feature layer data.

Manage a feature layer
Set the properties and capabilities of a hosted feature layer.

Publish a vector tile layer
Use ArcGIS Online to publish a vector tile layer.

Add a feature layer
Access and display point, line, and polygon features from a feature service

Add a vector tile layer
Access and display a vector tile layer in a map.

Add an image tile layer
Access and display an image tile layer in a map.

Style a feature layer
Use symbols and renderers to style feature layers.

Query a feature layer (spatial)
Execute a spatial query to get features from a feature layer.

Query a feature layer (SQL)
Execute a SQL query to access polygon features from a feature layer.

Edit feature data
Add, update, and delete features in a feature service.

Display a pop-up
Format a pop-up to show attributes in a feature layer.