You will learn: how to load data (CSV, GeoJSON and shapefiles) into ArcGIS Online for your apps.
With your ArcGIS account, you can upload different file formats (CSV, XLS, GPX, GeoJSON, shapefiles, etc) to ArcGIS Online and then use them in your apps. This process is called publishing a hosted feature layer and behind every feature layer is a REST service that supports spatial queries and editing operations.
You can import existing spatial files, including CSVs that denote the latitude and longitude of points, or use our World Geocoding Service to determine the location of addresses or points of interest during import of a normal table. Initially your layers are only accessible to you, but they can be shared more widely using the sharing permissions in ArcGIS for Developers and ArcGIS Online. This import process is a fast and easy way to turn static data into live services and build apps to display, filter and edit.
In this tutorial you will download and import datasets that were gathered from the Los Angeles GeoHub. They include Trailheads (CSV), Trails (GeoJSON), and a Parks and Open Space (Shapefile). The data will be stored in your own account in ArcGIS Online and can be used in other tutorials.
Download and unzip the three datasets. Do not unzip the Parks and Open Space.zip file, as it contains a shapefile that you will import as is.
After you log in, go to the ArcGIS for Developers dashboard by clicking the Dashboard + button at the top of the page.
At the top of your dashboard you should see one row of buttons called ArcGIS for Developers and another row called ArcGIS Online. In the ArcGIS for Developers row click New Layer.
You will now upload the
Trailheads.csv data file. Either drag and drop the
Trailheads.csv file into the box called Drop File Here or click the Select File button and upload the
You will now be prompted to configure the Trailheads dataset as a new layer using the Details, Location, Fields, and Settings menus. For now, you only need to edit the Details menu. Your new layer should already be called
Trailheads. Give your new layer the tag
LA Trailheads, because the tags field cannot be left blank.
Repeat the above step for the other two datasets using the following table:
||Parks and Open Space||LA Parks|
In the ArcGIS Online row in your dashboard, click Manage Content. You will see a list of your new layers. Click on any of the new hosted feature layers and start browsing the following tabs:
When examining one of your new hosted feature layer pages, find the Service URL link and identify the service endpoint. This is what applications use to access the data. It should look something like this:
Try pasting the url in your browser to explore the data. Try the Query function at the bottom.
Learn more about the ArcGIS REST API with the query a feature layer tutorial.
When examining one of your new hosted feature layer pages, locate the Visualization button and try styling your layer with different symbols. When you are done, save the symbols. This will allow apps that load the layer to display your new defaults.
Learn more about styling layers in ArcGIS Online.