Compare Map

Show two datasets side by side or under a swipe divider, with both maps kept in sync.

On this page

A Compare map (Compare Map in the editor) shows two maps of the same place at once and keeps them moving together. Use it for before and after — historical aerial photos against today's, a flood extent against normal water levels — or to hold two datasets against each other.

Both halves share the camera and the map style. What differs is what you put on each side: its data, how that data is drawn, and its own background layers.

A swipe comparison of the same glacier in 1946 and 2023, each side with its own aerial-photo layer and data.
A swipe comparison of the same glacier in 1946 and 2023, each side with its own aerial-photo layer and data.

Layout

Set the layout under Configure → Comparison:

SettingOptions
LayoutSwipe: both maps fill the frame and a divider you drag reveals one over the other. Side by side: each map gets its own half.
DivideLeft / right or Top / bottom
Nudge the divider for visitorsSwipe only, on by default: the divider swings once when the map comes into view, so visitors see they can drag it. Skipped for visitors who have reduced motion turned on.
Show side namesEach side's name as a small caption over its half. On by default.
Keep the two maps in syncPanning or zooming one half moves the other. Always on in Swipe, because the two maps overlap.

The divider starts wherever you leave it in the editor: drag it into place and save.

Set up each side

Each side has its own tab in the sidebar, named after the side (Before and After to start with). A side can show data, background layers, or both — a historical comparison often needs no data at all, just a different photo layer on each side.

GroupSettings
SideSide name, the caption over its half, such as 1946
DataImport a file for this side — the button is named after the side, such as Import 1946 data — then Replace or Remove it
Background layersUp to 5 layers for this side only, from the catalog or your own map service — see Background layers
DisplayPoints & shapes draws the data as uploaded; Heatmap shows where its points are densest (offered when the data has points)
StyleOnly what the data has: Fill and Fill opacity for areas, line or outline color, width and opacity, Point color and Point size
Names on the mapName each feature by one of its columns, in your own Text color and Text size. Names that would overlap are hidden until you zoom in.
HeatmapGradient, Weight by, Intensity, Radius and Opacity, as on a Heatmap

Display, Style and Names on the map appear once the side has data: Style and Names on the map in Points & shapes, and Heatmap in their place when the side is a heatmap.

A side's file can be GeoJSON, TopoJSON, KML, KMZ, GPX, a zipped Shapefile, or a CSV or Excel file with coordinates, with up to 10,000 features. Uploading a file replaces that side's data, and both uploading and removing data happen immediately — they are not part of Save.

Style and popups

The Style button on the map sets one basemap, with its terrain, 3D buildings, contour lines and points of interest, for both halves. The map buttons are Interactions, Widgets and Style; background layers live in each side's tab instead of under a Layers button.

The popup is designed once, under Configure → Popup, and serves both sides; a row naming a column one side doesn't have is left out there. Each popup is badged with its side's name. See Popups.

What visitors see

In Swipe, visitors drag the divider with a mouse, finger or pen, or move it with the keyboard: the arrow keys move it a little, Page Up and Page Down further, and Home and End to either edge. Double-clicking the divider puts it back in the middle.

Google Sheets sync, search and filters, and the Copy link popup button are not available on a Compare map, because each of them works on a single dataset.

Frequently asked questions

Do both sides have to show the same kind of data?

No. Each side is configured on its own, so one can draw its points and shapes as uploaded while the other shows a heatmap of where its points are densest. A side doesn't need a file at all: background layers alone make a complete half.

Can each half use a different map style?

No — both halves draw on the same map style, so a difference you see is a difference in the data. What changes from side to side is the data and the background layers: put imagery from the layer catalog, or from a published map service, behind one half only and it shows on that side alone.

Do the two maps stay in sync?

In the swipe layout, always: the maps overlap, so they have to show the same view. In the side-by-side layout it is a setting, so you can unlock the halves and frame each one separately if you would rather compare two different places.

Can I compare two aerial images or published map services?

Yes, and you don't need a file to do it. Each side takes up to 5 background layers — from the built-in catalog, or from published WMS, ArcGIS, PMTiles or {z}/{x}/{y} tile services — drawn live from the publisher. The catalog pairs old and new aerial photos for Switzerland (1946), France (1950–1965), Spain (1956–57) and Japan (1945–50 and the 1960s) with each publisher's current photos, and has 18th- and 19th-century maps of France and Switzerland. Give each half a different vintage of imagery — or an official dataset against your own — and drag the divider between them. A side with only background layers and no uploaded data renders perfectly well.

Can a Compare map be connected to Google Sheets?

No. Sheets sync keeps one dataset per map in step with one spreadsheet, and a Compare map holds two, so it is file import only. The same applies to the visitor-facing field search, which indexes a single dataset.

Ready to build one?

Create a Compare Map