Prepare the mountain data
First, you will prepare a text file with data about five of the highest mountains in the world and later create a feature layer from this file.
You can create a feature layer from data saved in a comma-separated values (CSV) format text file (.csv ). A .csv format file has a row of data for each item with a comma between each value. The first row in the file contains the field names, which describe the type of data in the file. For instance, the first row of your text file will contain the lat, lon, name, range, elev_ft, thumb_url, and photo_credit fields.
The fields are described as follows:
- The lat field contains the latitude of the mountain.
- The lon field contains the longitude of the mountain.
- The name field contains the name of the mountain.
- The range field contains the parent range of the mountain.
- The elev_ft field contains the elevation of the mountain in feet.
- The thumb_url field includes a URL to an image of the mountain.
- The photo_credit field includes a URL to the source of the image of the mountain.
To appear on a map, each real world item detailed in the file must include location data. In your text file, the first two fields contain the latitude (which describes the location north and south on the globe) and longitude (which describes the location east and west on the globe) of each mountain. The other fields provide details about the mountain that aren't necessary for mapping the mountain but can be useful in other ways.
After the first row, which contains the field names, each subsequent row contains data about one mountain. For instance, the row for Mount Everest contains the following information:
27.9879,86.9250,Mt.Everest,Himalayas,29029,https://commons.wikimedia.org/wiki/File:Everest_North_Face_toward_Base_Camp_Tibet_Luca_Galuzzi_2006_(square).jpg#/media/File:Everest_North_Face_toward_Base_Camp_Tibet_Luca_Galuzzi_2006_(square).jpg, https://en.wikipedia.org/wiki/Mount_Everest
The first number, 27.9879, is the latitude of the mountain, and the second number, 86.9250, is the longitude. The remaining data, separated by commas, corresponds to the field names. Your text file will contain six rows: one for the field names and five for the five mountains you'll map.
- Copy the following data into a plain text editing or spreadsheet application, such as Notepad, Notepad++, Microsoft Excel, or a similar program:
Note:
If you use Microsoft Excel, you may need to use the Text to Columns tool to separate the rows into columns.
lat,lon,name,range,elev_ft,thumb_url,photo_credit 27.9879,86.9250,Mt.Everest,Himalayas,29029,https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Mount_Everest_as_seen_from_Drukair2_PLW_edit.jpg/640px-Mount_Everest_as_seen_from_Drukair2_PLW_edit.jpg,https://commons.wikimedia.org/wiki/File:Mount_Everest_as_seen_from_Drukair2_PLW_edit.jpg 35.8825,76.513333, K2Qogir,Karakoram,28251,https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Chogori.jpg/640px-Chogori.jpg,https://commons.wikimedia.org/wiki/File:Chogori.jpg 27.7025,88.1475,Kangchenjunga,Himalayas,28169,https://upload.wikimedia.org/wikipedia/commons/thumb/5/57/Kangchenjunga%2C_India.jpg/640px-Kangchenjunga%2C_India.jpg,"https://commons.wikimedia.org/wiki/File:Kangchenjunga,_India.jpg" 27.9626,86.9336,Lhotse,Himalayas,27940,https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Lhotse-fromChukhungRi.jpg/640px-Lhotse-fromChukhungRi.jpg,https://commons.wikimedia.org/wiki/File:Lhotse-fromChukhungRi.jpg 27.8860,87.0912,Makala,Himalayas,27766,https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Makalu.jpg/640px-Makalu.jpg,https://commons.wikimedia.org/wiki/File:Makalu.jpg
- Save the file on your computer with the name mountains.csv.
Open and save a map
Next, you will open a map in Map Viewer, change the basemap, and save the map.
- Sign in to your ArcGIS organizational account or into ArcGIS Enterprise account.
Note:
If you don't have an organizational account, see options for software access.
Note:
If you encounter an error or are unable to sign into your account, remember that passwords are case-sensitive. If you forget your ArcGIS password, you can reset your password from the sign in page. See Account Troubleshoot for more information.
- On the ribbon, click Map.
A new map appears in Map Viewer with your organization's default basemap. The map does not contain any layers at the moment.
Note:
Whether you are working in ArcGIS Online or in ArcGIS Enterprise, the experience should be similar. However, the account credentials will be different and the portal will be your organizations, not ArcGIS Online.
First, you will change the basemap. A basemap provides a background of geographical context for the content you want to display on a map.
- On the Contents (dark) toolbar, click Basemap and choose Charted Territory Map.
Note:
Some ArcGIS organizations may have different default basemaps. If you don't see the Charted Territory Map basemap, scroll to the end of the list, and click Living Atlas. Search for Charted Territory and add the Charted Territory Map web map to your list of basemaps.
The basemap changes to Charted Territory.
- In the Basemap pane, click Close.
Before you continue, you'll save the map.
- On the Contents toolbar, click Save and open and choose Save as.
The Save map window appears.
- In the Save map window, for Title, type Map the highest mountains and add your initials.
- For Tags, type Elevation, Peaks, Himalayas and press Enter.
- For Summary, type Information about the highest mountains in the world.
- Click Save.
The map is saved to your ArcGIS Online account. It is important to save your web map regularly so you do not lose any changes you have made.
Add mountain data to the map
You'll add the mountains.csv file you created earlier to your map.
- On the Contents toolbar, click Layers.
The Layers pane opens.
- In the Layers pane, click the down arrow next to Add and choose Add layer from file.
The Add layer window opens. To add information to the map, you can browse for layers from ArcGIS Online, add a layer from a URL, add a layer from a file, or use several other methods.
- Drag the moutains.csv file from its location on your device onto the Add Layer drop area.
Note:
To add the file another way, in the Add layer window, click Your device and browse your device and choose the mountains.csv file you created.
The Add Layer window updates to ask if you would like to create a hosted feature layer from the file or upload the file as an item. A hosted feature layer is a feature layer that is available online through your ArcGIS account.
- For How would you like to add this file?, ensure Create a hosted feature layer and add it to the map is selected and click Next.
You can publish your maps and data as hosted layers to ArcGIS Online. When you do this, ArcGIS Online takes care of hosting your layers and the data that populates them.
The window updates to show detected fields in the .csv file.
- On the Fields page, confirm that the Display name and Type fields are accurate and click Next.
- On the Location settings page, confirm Latitude is set to the field lat and Longitude is set to the field long. Click Next.
- On the next page, for Title, replace the existing text with highest mountains, followed by your initials (for example, highest mountains YN). Optionally, you may include Tags and a Summary.
Note:
You cannot create two layers in an ArcGIS organization with the same name. Adding your initials to a layer name ensures that other people in your organization can also complete this tutorial. Once a layer has been created, you can rename it in the map to remove your initials, which will not affect the name of the underlying data layer.
- Click Create and add to map.
The layer is added to the map and to your ArcGIS Online contents list. You can navigate to the item details page of the layer and add or update the layer information. The item details page helps people understand what the item contains and how to use it.
Tip:
You may need to zoom in to see all five symbols because four are located close together in Nepal. If necessary, to see more of the map, click Properties on the Settings (light) toolbar to close the Properties pane.
Next, you'll change the symbols to better represent the mountains. Symbols in the shape of triangles are more appropriate.
- In the Layers pane, ensure the highest mountains layer is selected.
A blue line appears next to the layer to indicate that it is selected.
- On the Settings (light) toolbar, click Styles.
The Styles pane appears.
- In the Styles pane, under Pick a style, for Location (single symbol), click Style options.
- In the Style options pane, click the symbol under Symbol style.
The Symbol style pane appears.
- In the Symbol styles pane, click the symbol for Current symbol.
- In the Change symbol pane, click the triangle and click Done.
- For Size, type 30 and press Enter.
- Click Fill color, and in the Select color window that appears, choose a black color.
- Click Done and close the Symbol style pane.
The symbols on the map change to black triangles.
- On the Style options pane, click Done two times.
- On the Contents toolbar, click Save and open and choose Save to save the map.
Configure custom pop-ups
You'll configure pop-ups to display a sentence that identifies the name of the mountain, the mountain range it's in, and its elevation. First, you'll look at the default pop-up and see how it can be improved.
- On the map, click a mountain feature.
The feature's pop-up appears.
The pop-up shows the attribute values for each mountain based on the data in the .csv file you created at the beginning of the tutorial. Attributes provide information about a map feature. Currently, the pop-up displays the attributes as a list and only provides a URL to the image of the mountain. First, you'll configure the pop-up to display important attributes as part of a single sentence. Later, you'll configure the pop-up to display the picture of the mountain in the pop-up instead of a link.
- Close the pop-up.
- On the Settings toolbar, click Pop-ups.
The Pop-ups pane appears.
- In the Pop-ups pane, click Title.
- Delete the existing text and click the add field button.
- In the Add field window, choose name.
The pop-up preview title updates to show the field name, which is the name of the mountain.
The pop-up currently shows a table of fields for the mountains layer. You will delete the table and add customized text content instead.
- In the Pop-ups pane, for Fields list, click the Options button and choose Delete.
- Click Add content.
- In the Content window that appears, click Text.
A text editor window appears. You'll use the text editor to create a sentence that will appear in the pop-up. Your pop-up can also include attribute information that changes depending on which mountain feature is clicked. You'll create the following sentence:
{name} is located in the {range} range and has an elevation of {elev_ft} feet.
In this sentence, the words in braces, such as name, range, and elev_ft, refer to attribute information.
- In the text editor window, type { (an open brace) and choose name {name}.
The name field is added to the text editor.
- In the text editor, after {name}, type is located in the range.
- Add a space and type {. Choose range {range}.
The range field is added to the text editor.
- After {range}, type and has an elevation of.
- Add a space and type {. Choose elev_ft {elev_ft}. Type feet.
The text is complete.
- Click OK.
The pop-up preview updates with the text you edited.
- Save the map.
Configure images of the mountains
You'll configure the pop-up to show a photo of each mountain and its photo credit. First, you'll add an image to the existing pop-up.
- In the Pop-ups pane, click Add content and in the Content pane that appears, choose Image.
The Configure image pane appears.
You'll configure the URL so a small (thumbnail) image appears in the pop-up. You'll add a link to the image, so that when the small image is clicked, a full-size version of the image appears in a separate tab.
- In the Configure image pane, for URL, click the add field button.
- In the Add field pane, choose thumb_url {thumb_url}.
- Under Options, for Link, click the add field button, choose thumb_url {thumb_url}.
- Click Done.
The pop-up preview now includes a clickable thumbnail image of the mountain. You'll also add a link to the photo credit. You'll add this link to the sentence you configured previously.
- In the Pop-ups pane, under Text, click Edit text.
The text editor window appears. It shows the sentence that you configured in the previous section.
- In the text editor window, place the pointer at the end of the existing text and press Enter.
- Type Photo Credit.
- Highlight the Photo Credit text and click the Link button.
The Link URL window appears.
- In the Link URL window, type {photo_credit} and click the Save button.
- In the text editor window, click OK.
In the pop-up preview, the Photo Credit text is underlined, indicating the link is active.
- Close the Pop-ups pane.
Your pop-up is configured. Now, you'll see how it looks on your map.
- On the map, click a mountain feature to see its pop-up.
- Click the image.
The full-size image appears in a new browser tab.
- Close the full-size image browser tab. In the pop-up, click the Photo Credit link.
The source of the image appears in a new browser tab.
- Close the image source browser tab and the pop-up. Save the map.
In this tutorial, you saved data about mountains as a text file. Then, you added the file to ArcGIS Online to create a layer in a map locating each mountain. You configured custom pop-ups for the layer to display information about the mountain's name, range, and elevation. You also added a photo and a photo source link to each pop-up.
You can find more tutorials in the tutorial gallery.