The Anatomy of Web Map Services This article originally appeared in Geospatial Solutions Magazine's Net Results column of September 1, 2002. Other Net Results articles about the role of emerging technologies in the exchange of spatial information are also online.

1. Introduction and Glossary   2. Services, Standards, CGI   3. Dissecting WMS   4. Cascading services

Services and standards

Generally speaking, a Web map service is any network-accessible interface built with Internet technologies that produces maps of georeferenced data. In practice, users type URLs in Web browsers and receive graphic maps in return. It's that simple. The ever popular MapQuest (www.mapquest.com) site is a familiar example. Input a street address on the Web page's form, click Map-It, and, voila! The MapQuest server returns a new Web page with your map (see Figure 1). This architecture qualifies MapQuest as a Web map service, though not as a standard one.

Figure 1: The MapQuest Web page formats your address text (entered on the site's introductory form) into a CGI URL such as http://www.mapquest.com/maps/map.adp?country=US& address=2001+Delaware+Street&city=Berkeley&state=CA&zipcode=94709.
Why not standard? At the click of the Map-It button, code within the Web page generates and sends an appropriate URL for digestion by the MapQuest server. Examining that URL reveals a long, complex string of text that only MapQuest's server understands. In other words, the service is proprietary. If MapQuest instead followed the Web map services standard, anybody could write a MapQuest URL from scratch, independent of any Web page forms or client side code.

MapQuest's developers shouldn't worry though; the standard is more an addition than an overhaul. In theory, the MapQuest server could continue to accept its proprietary URLs, but would also recognize and respond to a handful of standard URL requests for maps. As should become apparent, there are several good reasons for adopting such a standard.

CGI internship

Before explaining the standards that expose a Web map server to public query, a brief review of CGI is helpful. Back at the MapQuest site, the introductory Web form (see Figure 1) generates the following URL for the address "2001 Delaware Street, Berkeley, CA 94709": http://www.mapquest.com/ maps/map.adp?country=US&address =2001+Delaware+Street&city= Berkeley&state=CA&zipode=94709 &homesubmit.x=38&homesubmit. y=9.

Maybe I was too hasty in saying MapQuest's forms generate URLs that only MapQuest's server understands. Though proprietary, the components of this URL conform to a CGI template that makes deciphering possible. Chopping up our URL, "http://" is the protocol, "www.mapquest.com/" is the domain name, and "maps/map.adp?" is the location and name of a CGI program on MapQuest's Web server that listens for incoming Internet requests. Following the question mark are a series of parameter pairs linked by "=" characters and separated by "&" characters. For instance, "country=US" is the first pair, "address=2001+Delaware+Street" is the second, and so on.

Digesting it all. If Web map services are Earth's nervous system, CGI programs are the digestive tract. In this MapQuest example, the program (map.adp) swallows the list of parameter pairs and uses them as variables when geocoding addresses, generating JPEG maps, and finally regurgitating new Web page responses. To prove this concept, just fabricate a similar MapQuest URL using the same parameter names (such as country, address, state, and so forth) but with different values (for instance, replace "2001+Delaware+Street" with "2010+Virginia+St"). Then feed the homespun URL to a Web browser. For any valid address, MapQuest should still return a Web page with your requested map. No matter what the service, this pattern of "protocol://domain/directory/program?name=value" indicates a CGI exchange similar to our example, and is the basis of the Web map services standard recommended by the OpenGIS Consortium (OGC, www.opengis.org).


1. Introduction and Glossary   2. Services, Standards, CGI   3. Dissecting WMS   4. Cascading services