The "map sandwich"

By Charlie Frye, Esri Chief Cartographer

Map Sandwich - Thumbnail

Last week we started telling you about the new ArcGIS Online World Topographic Map. As I was working on the design of that map, with the intent of providing a better basis for mash-ups, I had an idea. It was born of frustration with the fact some mash-ups don’t work because too much information obscures the base map, making for an unreadable, often ugly result. Demographic layers represent a great example of the kind of information that just doesn’t always work well in a simple mash-up.

What I really needed was a way to “sandwich” the demography layer between the terrain and the reference information–that way the reference information would be legible, and I would still be able to understand the demography. Figure 1 and 2 below illustrate the inadequacy of a conventional mash-up and how what we’ve loosely been calling a “map sandwich” produces a better result.

Map Sandwich - Figure 1

Figure 1. Mash-up in whcih the base map is obscured

Map Sandwich - Figure 2

Figure 2. Map sandwich with legible base information

The idea is to make a map that looks more like a map than a mash up.

How the Map Sandwich Works

The basic idea is that three map services are stacked on top of each other to create a map (figure 3).

Map Sandwich - Figure 3

Figure 3. The final “map sandwich”

Top Layer: This layer is the reference information that contextualizes the middle layer. We’ve found there is only one option for caching this layer, which is to use the new .MSD file option in ArcGIS 9.3.1. We use the PNG32 image format, and set the .MSD options for anti-aliasing to “None”, and text anti-aliasing to “Forced”.  This layer is cached. Note that using the .MSD file for caching means that cartographic representations and Maplex cannot be used–we used annotation for our text.

Middle Layer: The theme for this layer could be nearly anything–demography is just a straight-forward example. A statistical surface, scientific information like soils, geology, etc. could be used here. When this layer is incorporated into a map sandwich, it is usually partially opaque (the {opacity:0.5}) or something similar appears in our JavaScript code’s layer definition.  We’ve cached these layers as PNG8, PNG32, and JPEG–all worked fine, so our decision was based on file size.

Bottom layer: Typically this is terrain and optionally oceans or contours.  Our first effort does not include contours. We cached this service using the JPEG image format, though there is really no restriction about the format for this map service.

Here is an example that was created by Kenny Ling from the Mapping Center Team (web application), Jessica Acosta Rodriguez from the ArcGIS Online Team (cartography for demography), and Jim Herries from the Esri Data Team (the data) that further develops this same idea using some of Esri’s newest demographic data. After the map loads, click the Theme button and choose a demographic variable. You can then click on the map to get a report.

Map Sandwich Demographic Example

If you’ve never used the Esri JavaScript viewer before, knowing that you can use SHIFT-drag to zoom in, and CTRL-SHIFT-drag to zoom out, makes a big difference.

The map services that make these maps work are available at ArcGIS Online; just scroll down to the “Web Merctor Maps” section.  Specifically we used the World Terrain Base as the bottom layer, and the World Reference Overlay as the top layer in our map sandwich.  Any of the demographic layers can be used as middle layers.

If the demographic data piqued your interest, Esri’s demographic data has thousands of additional attributes; a veritable “data deli”.

This entry was posted in Mapping and tagged , , . Bookmark the permalink.

Leave a Reply


  1. dschenk says:

    Hi there Mr. Frye,

    I like the sandwich concept, which is similar to printed map production and keeping the lines and markers to the top of the stack. Will it work with live maps in the middle layer or do all layers have to be cached?

    Also, I love the look of the world terrain base, is there any guidance on how it was produced; cartographically speaking? I am currently using a swiss-shade terrain which has a bit to much gray on the flatlands.

    Sincerely, Douglas Schenk

  2. cfrye says:


    Sorry for the extended delay in responding; our blog software habitually fails to notify us about comments; so I’m doubly sorry.

    First question: yes, live map services and layers can be used between and on top of the “bread” layers. One of our early prototypes was using an optimized vector map service (new in 9.3.1) for demographics–it was actually a little faster than the cached version on ArcGIS Online (but has a 2.5x larger memory footprint). While there is nothing to stop you from adding these layers to ArcMap and do the same, ArcMap still cannot display 32bit PNG images well enough to bother.

    Not too long ago I did finally get to publishing a blog entry on how the hillshade was done:



  3. jnp9 says:

    Quick question. Is the above workflow supposed to work in the ArcGIS Online map viewer? It won’t allow me to move feature services bellow a map service. Is this normal?