Import data as a feature layer
Learn how to create hosted feature layers and feature services for your data.
You can use the developer dashboard and ArcGIS Online to import and store data in the cloud as hosted layers. If your data contains geometries with attributes, such as a CSV or GeoJSON file, it is imported 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 data management tools to import Trailheads (CSV), Trails (GeoJSON), and Parks and Open Space (Shapefile) files and publish them as feature layers. These layers are used in other tutorials.
Prerequisites
You need an ArcGIS account to access your dashboard and manage hosted layers. Sign up for an account for free.
Steps
Download the data
Download the LA_Hub_Datsets zip file from ArcGIS Online. The zip file contains the following:
- Trailheads.csv
- Trails.geojson
- Parks_and_Open_Space.zip (Shapefile)
Navigate to and unzip the file.
Sign in to your ArcGIS account
Import the Trailheads CSV file
The Trailheads CSV file contains point data with attributes. Importing the file will create a new point feature layer in a feature service. The import tool attempts to match field names and data types in the CSV file. The four supported field types are: String, Integer, Double, and Date.
Go to your developer dashboard.
At the top, click Layers > Import data.
Click Import data. Upload the Trailheads.csv file by either:
- Dragging and dropping box the file on the Drop a file here area.
- Or, clicking the Select file button to browse to the file.
- Click Upload file.
Once the file is uploaded, set the following details in the Item Details pane:
- Title:
Trailheads
- Tags:
LA Trailheads
The Tags property cannot be left blank. - Description:
Trailheads in Mahou Riviera
- Title:
At the bottom, click Create layer to create the new Trailheads 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 Trailheads ID and URL
To access a hosted feature layer from an application, you need to be able to identify its ID and URL. If a hosted feature layer is public, you can access it directly with your web browser or any application with the URL. If the layer is private, you need to provide an API key or token. For example:
Public: https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads/FeatureServer/0
- In the Overview, find the Layer ID and Service URL. It should look something like this:
- Layer ID: 883cedb8c9fe4524b64d47666ed234a7
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads/FeatureServer/
Go to ArcGIS Online and sign in.
In the top navigation bar, click Content
Click Add Item > From your computer.
In Add an item from your computer upload the Trailheads CSV file. Set the following:
- Title:
Trailheads
- Tags:
LA Trailheads
- Click Add Item.
- Title:
Ensure that Publish this file as a hosted layer is checked.
Set Locate features by to:
Coordinates
Click Add Item.
In the item page, click Share > Everyone(public) > Save.
Find the Trailheads ID and URL
To access a hosted feature layer from an application, you need to be able to identify its ID and URL. If a hosted feature layer is public, you can access it directly with your web browser or any application with the URL. If the layer is private, you need to provide an API key or token. For example:
Public: https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads/FeatureServer/0
In the item page, scroll down to the bottom of the page to find the Service URL. For example:
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads/FeatureServer/
- Service URL:
Click View to access the feature service. Locate the Service ItemId, which will look something like this:
- Service ItemID: 883cedb8c9fe4524b64d47666ed234a7
Import the Trails GeoJSON file
The Trails GeoJSON file contains line (polyline) data with attributes. Importing the file will create a new line feature layer in a feature service.
At the top of the page, click Layers > Import data to upload your next file.
Upload the Trails.geojson file by either:
- Dragging and dropping box the file on the Drop a file here area.
- Or, clicking the Select file button to browse to the file.
- Click Upload file.
Once the file is uploaded, set the following details in the Item Details pane:
- Title:
Trails
- Tags:
LA Trails
The Tags property cannot be left blank. - Description:
Trails in Mahou Riviera.
- Title:
At the bottom, click Create layer to create the new Trails 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 Trails ID and URL
To access a hosted feature layer from an application, you need to be able to identify its ID and URL.
- In the Overview, find the Layer ID and Service URL. It should look something like this:
- Layer ID: 69e12682738e467eb509d8b54dc73cbd
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails/FeatureServer
In the top navigation bar, click Content.
Click Add Item > From your computer to upload your next file.
In Add an item from your computer upload the Trails GeoJSON file. Set the following:
- Title:
Trails
- Tags:
LA Trails
- Click Add Item.
- Title:
In the item page, click Share > Everyone(public) > Save.
Find the Trails ID and URL
To access a hosted feature layer from an application, you need to be able to identify its ID and URL.
In the item page, scroll down to the bottom of the page to find the Service URL. For example:
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails/FeatureServer
- Service URL:
Click View to access the feature service. Locate the Service ItemId, which will look something like this:
- Service ItemID: 69e12682738e467eb509d8b54dc73cbd
Import the Parks and Open Spaces Shapefile
The Parks and Open Spaces Shapefile contains polygon data with attributes. Importing the file will create a new polygon feature layer in a feature service.
Click Layers > Import data to upload your next file.
Upload the Parks and Open Space.zip file by either:
- Dragging and dropping box the file on the Drop a file here area.
- Or, clicking the Select file button to browse to the file.
- Click Shapefile > Upload file.
Once the file is uploaded, set the following details in the Item Details pane:
- Title:
Parks and Open Space
- Tags:
LA Parks
The Tags property cannot be left blank. - Description:
Parks and open spaces in Mahou Riviera.
- Title:
At the bottom, click Create layer to create the new Parks and Open Space 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 Parks and Open Spaces ID and URL
To access a hosted feature layer from an application, you need to be able to identify its ID and URL.
- In the Overview, find the Layer ID and Service URL. It should look something like this:
- Layer ID: f2ea5d874dad427294641d2d45097c0e
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Parks_and_Open_Space/FeatureServer
In the top navigation bar, click Content.
Click Add Item > From your computer to upload your next file.
In Add an item from your computer upload the Parks and Open Space.zip file. Set the following:
- Title:
Parks and Open Space
- Tags:
LA Parks
- Click Add Item.
- Title:
In the item page, click Share > Everyone(public) > Save.
Find the Parks and Open Spaces ID and URL
To access a hosted feature layer from an application, you need to be able to identify its ID and URL.
In the item page, scroll down to the bottom of the page to find the Service URL. For example:
- Service URL:
https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Parks_and_Open_Space/FeatureServer
- Service URL:
Click View to access the feature service. Locate the Service ItemId, which will look something like this:
- Service ItemID: f2ea5d874dad427294641d2d45097c0e
Now you have three hosted feature layers in ArcGIS Online. You can access each hosted layer with their 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:

Create a new feature layer
Use data management tools to create a new hosted feature layer.

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.