Creating a Historical Swipe Map With ArcGIS Online

This tutorial will demonstrate how to create a swipe map with historical aerial imagery that allows users to readily compare landscape changes over time.

For this example we will be using historical USDA aerial imagery of Cheney, WA in 1968 provided by Eastern Washington University. These same techniques can be used with any other kind of raster image data, such as scanned aerial maps, or satellite data that has been symbolized in ArcMap.

Swipe Map Data Flow

Publishing a Tile Service

Most web maps are created using 256x256 tile images that are combined in the browser (with JavaScript) to create a seamless image. The use of tiles permits panning around a map without having to reload the entire map each time the view changes. This also allows the browser to cache previously viewed tiles so that the tiles do not have to be reloaded when the user returns to an area that was previously viewed.

Map Tiles

While the ArcGIS Online portal interface does not provide a way to directly upload raster data as tiles, you can publish a tile layer from ArcMap that can be hosted on your your ArcGIS Online account, and then used in web maps you create with ArcGIS Online.

You should import and, if needed, georeference the imagery you will be publishing as tiles.

Adjust the Properties, Layer Properties, Symbology and change the Stretch type to None. This will avoid stretching the contrast of the image, which can give photo imagery a harsh look. If you are using multiple scanned images, it will keep the levels from the scanning process and avoid the checkerboard effect when different areas have different ranges of values associated with different terrain.

Remove all basemaps and reference layers and Zoom to Layer so the only the image you are going to host as tiles is part of the workspace.

Run the Build Pyramids tool using the cubic resampling technique. Pyramids are a hierarchical way of storing rasters that speeds up display at different zoom levels.

File, Sign in to your ArcGIS Online account:

File, Share As, Service and Publish a service:

Choose a connection should be My Hosted Services from your ArcGIS online account, and the Service name should be a meaningful title for what you will be publishing.

Make sure Capabilities is set to Tiled Mapping:

Enter meaningful metadata in Item Description that will help you and future users find this layer and know what it is.

Set Sharing to Everyone so this can be visible as a public web map.

Click the Analyze button at the top of the service editor dialog. Medium errors can usually be ignored.

Click the Preview button at the top of the service editor dialog to verify your imagery is what you want.

Click the Publish button to upload to the server. This may take a few minutes if your imagery is large.

Your hosted tile layer is listed as two independent items on the My Content page of the ArcGIS Online website: Tiles and a Service Definition

Setting Up A Locations Layer

If you want to place points on the map, such as to call attention to notable landmarks or specific changes over time, you will need to create a point layer. While ArcGIS Online does not yet provide a feature for directly creating point layers, you can use ArcGIS for Developers to create an empty point layer that can then be edited in ArcGIS Online.

Log in to ArcGIS for Developers with your ArcGIS online credentials.

The Dashboard shows all your apps and layers.

Scroll down to Layers and create a new layer

Create an empty layer:

Give the new layer a meaningful name:

Choose a point geometry:

Add appropriate fields. For this example, we add a title for the changed areas, a description of the changes, and a URL field that will be used for an image URL.

Share the layer with everyone so it can be put on a public web map, and enable editing so you can add features.

The description page gives a summary of the (empty) layer.

Select Open in Map Viewer to open the new layer in ArcGIS Online. Add the historic imagery layer. You might also want to add a satellite base map to get current context.

To add features, click the Edit button, select New Feature from the left menu, click on the map where you want to add the point, and enter the fields.

If you are adding a photo URL field, upload the photo as an attachment, right-click on the attachment link to get the URL, and then paste that URL in the URL field.

You should scale the image prior to upload so it will fit in the popup. A width of 250 pixels usually works fairly well.

When you are done, unclick the Edit button and Save. Give this a meaningful title so you can use it as one of the maps in your swipe map.

Configuring Pop-Ups

Pop-ups are small informational boxes that appear when you click on a feature. The content of a pop-up is determined by the fields in the feature layer.

The content of pop-ups can be configured by clicking on the ellipses beside a lyer and selecting Configure Pop-ups.

In Display change the Pop-up Title to the name of your title field enclosed in curly brackets.

Unselect Show feature attachments as links.

Select A custom attribute display and press Configure to configure the contents of the popup.

View HTML Source (icon with less-than and greater-than symbols) so you can edit the HTML directly. The plus sign will allow you to add field names enclosed in curly brackets. The example below is HTML that will print the description field in a paragraph followed by an image from the URL field.

Turn off editing, and test your popups:

Save this map.

Then remove the historic layer, and Save As a new layer that you will use to represent the present.

In ArcGIS Online My Content, you should see the new feature layers with points, the new map containing those points, and the hosted tile layer.

Setting Up The Swipe Map

A swipe map needs two maps, one for the left and one for the right.

In this example, the left map will be the historic imagery map and the right map will be the current imagery map.

From My Content, Create, App, Using a Template

Select the Story Map Swipe and Spyglass:

Give the map a meaningful title and metadata:

Choose the map that will be used on the left:

Keep the default Vertical bar layout:

Select the Two web maps swipe type and place the map of current imagery on the right:

Select the settings you want. For this example, a description and legend are not necessarily appropriate. These can be changed later.

You can change the header to remove the clutter

You can share a link to the app from the Share button in builder mode:

And this is the finished story map