Creating a web map service

By Aileen Buckley, Mapping Center Lead

CWMS - Thumbnail

In our previous blog entry, we discussed Designing Operational Overlays for the ArcMap and ArcGIS Online Basemaps. Once you are satisfied with your final symbology and labeling, you’re ready to publish your map to the Web. The process involves using ArcGIS Server to publish your map as a map service – a format that can be viewed on the Web. Each map service will have a unique record locator (URL) that others can use to view your map in a Web browser or in ArcMap, ArcGlobe, or ArcGIS Explorer (figure 1).

CWMS - Process

Figure 1. The process for making a Web map.

There are two different kinds of map services – cached and dynamic. Cached map services are pre-generated images of your map, and each time a user loads the map or pans and zooms it, tiles of the map for the area being viewed are retrieved from the “cache” (figure 2).

CWMS - Cache

Figure 2. With cached map services, the map is “tiled” into multiple images.

The maps in dynamic services are drawn on-the-fly – that is, the map is redrawn each time a user loads the map or pans and zooms it.

There are a number of options you can set when you create the map service, such as anti-aliasing to make jagged edges appear smoother. When you create a cached map service, you will choose a tiling scheme. This will dictate a number of things for you. For example, you might decide to choose a tiling scheme that supports PNG32 format files which would allow you to specify that you want the background to be transparent – a good choice if you want to mash your data up on an existing basemap. You can also choose the compression rate for the images. This is important to consider when you learn that many people will become impatient and may even leave the Web site if your maps take more than four seconds to load.

This on-screen rendering time can help you to choose between making dynamic or cached map services. Consider that if the map takes a while to draw for you in ArcMap, it will also take a while to draw dynamically on the Web. So if you have complex cartography, you might want to use cached map services instead. On the other hand, if you have simple cartography and/or if the data in the map service changes or is updated frequently, you might instead choose to use dynamic map services. Why do the updates matter when you choose between cached and dynamic services? Because it can take a while to create a cache. Exactly how long it takes is primarily a function of three things:

  1. The geographic extent of the map,
  2. The map scale(s), and
  3. The complexity of the cartography.

In the caching process, as I mentioned earlier, you’ll choose the tiling scheme you want to use. This will dictate the size and therefore number of the images. So, if: 1) the tiles are small because you are creating a fairly large scale map and/or 2) there are many of them because you are mapping a fairly large geographic extent, it could take a while (even days) to create the cache. The complexity of the cartography will also influence the caching time because each time the map extent is moved to create the next tile while the map is being cached, the map has to be redrawn before the image can be captured.

The tiling scheme you choose also dictates the map scale or scales. For example, if you use the tiling scheme for ArcGIS Online, which is also used for Bing Maps and Google Maps, there are 20 different map scales – each one related to a different zoom level on the zoom slider (figure 3).

CWMS - Map Scales

Figure 3. The ArcGIS Online/Bing Maps/Google Maps tiling scheme has 20 possible zoom levels, each relating to a different map scale

To learn more about the zoom slider and the map scales, see a previous blog entry titled How can you tell what map scales are shown for online maps?

You can choose to use some or all of the map scales associated with a tiling scheme, depending on how much you want people to be able to zoom in and out on your map (figure 4). These are also the map scales you should use when compiling your map in ArcGIS.

CWMS - Multiple Scales

Figure 4. The map scales(s) you use will determine how much users will be able to zoom in and out on your map

If you use only one map scale and users zoom in or out, it’s like viewing a PDF of the map. On the Web, we want the users to have a different experience – they can instead zoom in and out in a more seamless viewing experience. You can add more detail at larger map scales, and eliminate some at smaller maps scales. So you want to design your map so that the visual flow of the map is smooth from scale to scale as the users move between zoom levels. To do this right, you should make a new map for each zoom scale. You can do this in a single map document, using a Group Layer for each map scale (figure 5).

CWMS - Group Layers

Figure 5. Each Group Layer in this map document relates to one map scale in the tiling scheme and one map scale in the online map

For each group layer, you can set the scale range so that it will only display at the zoom level it is designed for. You can decide which features and labels to add to or eliminate from the group layer for that zoom level. You can use Definition Queries for the features and SQL Queries for the labels, and other ArcMap techniques as well.

Because you’re trying to create a smooth visual flow between zoom level, the features and labels at any one scale should be selected and symbolized relative to those at the next larger and smaller map scales. This multi-scale map document set-up will also apply to maps you create for dynamic map services because the scale dependencies will also apply there.

A great way to get started on setting up your map document is to use the map templates that we have created for you. Take a look at templates in the galleries on the ArcGIS Resource Centers for Mapping and Local Government.

The final point I want to make is that you can combine map services, and you can combine various types of map services. For example, in the 2011 Esri User Conference Room and Route Finding map, we combined both dynamic and cached map services, as well as a geoprocessing service.

Coming up next…the final installment in this short series on Web mapping, “Cartographic Design for Web Maps”

About the author

Dr. Aileen Buckley is a cartographer who’s been at Esri since 2003. She finds and shares best practices for mapping and analysis with ArcGIS, which leads her to publish widely and present world-wide.

Inline Feedbacks
View all comments

Next Article

Tighten Up Your Edits with Editing Constraints in ArcGIS Online

Read this article