Link Search Menu Expand Document

Adding a map

This guide details the workflow for adding a live map using the Map component on Strapi. The Map component accepts two fields: a Title and ArcGIS Layer ID.

Map component on Strapi

A Map component on Strapi, with the ArcGIS Layer ID (above).

Currently a Map on the City Nature Challenge site can only display a single layer, which is intended to be the participating city list. A CSV or geojson of the participating cities is first uploaded to ArcGIS Online as a Feature Layer. The layer ID of said feature layer is then added to the Map component on Strapi. Below is a more in-depth explanation of that workflow.

Uploading data to ArcGIS Online

New data can be uploaded to ArcGIS Online in the form of a csv, geojson or json file (other formats, such as Excel files may cause formatting issues). This documentation will assume that a csv file will be uploaded.

In past years, it was important that the uploaded city list strictly followed a convention for column names. Currently, the only required column is “name”

While you are free to choose which columns you’d like to include in the uploaded csv, the only required column is name, which is displayed in a map’s popup (when a point is clicked).

Creating a new feature layer

Uploading a new city list to ArcGIS Online starts with creating a new feature layer. Below are the steps to do so:

  1. Sign into your ArcGIS Online account
  2. Open Content > My Content > New item > Your device Select the csv with the new CNC city list

    Make sure that any csv file uses UTF-8 encoding to ensure that special characters (i.e. “ā” or “ß”), properly display

  3. Select the file and click Open
  4. Choose Add CSV and create a hosted feature layer
  5. Click Next
  6. Review the fields and make changes as needed
  7. Click Next
  8. Choose Latitude and longitude to locate features
  9. Click Next
  10. Choose a title (such as “City Nature Challenge 2022”)

    The title must be unique across your ArcGIS Online content

  11. Choose a folder in My Content to save the item
  12. Choose “CNC” in the Assign categories box
  13. Click Save
  14. Click the Share button (you should a popup similar to the photo below)

    Share button popup

  15. Set the sharing level to Everyone (public)
  16. Click Edit group sharing
  17. Select City Nature Challenge and click OK

    If you do not see City Nature Challenge, ask your ArcGIS Online admin for access to the group

Adding a new Map on Strapi

To add the feature layer you just created on ArcGIS Online as a map on the City Nature Challenge site, you must first create a new Map component on Strapi. When you’ve done so, you’ll can add a Title and will be required to add the feature layer’s ID in to the ArcGIS Layer ID field (see below).

Map component on Strapi

The ID of a feature layer can be found by going to its webpage. To go to your feature layer’s webpage, follow the steps below:

  1. Log into your ArcGIS Online account
  2. Open Content > My Content
  3. Find your feature layer in the list or search for its name using the search bar at the top
  4. Click the name of your feature layer (in blue)

You should see your feature layer’s webpage similar to the one below:

Feature Layer page

The ID of your feature layer is accessible via its webpage’s URL. ID is the part of the url after the ?id= (see below for an example):

Feature layer id