Language selection


Web Map Context (WMC)


A Web Map Context Document specifies how a grouping of one or more maps coming from one or more Web Map Services servers can be described in a portable, platform-independent format for storage in a repository or for transmission between clients.

A Web Map Context Document can:

  1. Provide default views for particular users and applications;
  2. Save the state for a Viewer Client during a session; and
  3. Allow a view saved by one client to be used by a different client to view the same content.

This WMC specification is designed as a companion specification to the Web Map Service (WMS), but can be used by a broad range of services providing content in the form of a catalogue, for WMS layers. Context Documents can also be catalogued and discovered, and are analogous to 'projects' in common desktop applications of Geographic Information Systems (GIS).

Additional Information


OpenGIS® Web Map Context Implementation Specification

Related Information

Web Map Service (WMS)


The Web Map Context implementation specification was developed by the Open Geospatial Consortium (OGC), with significant input from, among others, GeoConnections Canada.

Additional Information: Web Map Context (WMC)

Web Map Context Documents

Defining Elements

XML Encoding

Description of a Context Collection

Uses for WMC Documents

Web Map Context Document

The WMC specification applies to the creation and use of documents which unambiguously describe the state, or "Context," of a WMS client application in a manner that is independent of a particular client and might be used by different clients to recreate the same application state. The specification defines an encoding for the Context using XML.

Web Map Context Documents contain all information needed to display a map or a set of maps for a selected area and size. These can come from one or more Web Map Service (WMS) servers and display the map composition within a given area of interest. A Context Document includes information about the server(s) providing layer(s) in the overall map set, the bounding box and map projection shared by all the maps, sufficient operational metadata for client software to reproduce the map set, and ancillary metadata used to annotate or describe the maps and their provenance for the benefit of human viewers. Context Documents can be generated, saved, reused and exchanged within and between mapping applications that implement the same WMC standard.

There are several possible uses for Context Documents:

  • To provide default start-up views for particular classes of user. Such a document would have a long lifetime and public accessibility.
  • To save the state for a Viewer Client as they navigate and modify map layers.
  • To store not only the current settings but also additional information about each map layer (e.g., available styles, formats, SRS, etc.), to avoid having to query the map server again once the user has selected a layer.
  • To save the document from one client session and transfer it to a different client application, to allow start-up with the same Context.

Context Documents can be catalogued and discovered, thus providing a level of granularity broader than individual layers.

Defining Elements

The parent element of the ViewContext document includes as children:

  • A General element that provides layer-independent Context information. It states the bounding box in units of a particular Spatial Reference System (SRS) that represents the geographic extent of the map, and a dimension as a pair of integers that represents the suggested pixel size for the map. This element also contains some metadata about the particular WMS Context, that includes a title, abstract, keywords, and other information.
  • A sequential LayerList gives specific details about each layer in use. It encapsulates all the layers in the current Context. One or more of these layers may be retained in the Context but can be hidden from the display. The LayerList contains a series of one or more Layer elements:
  • Each Layer element is nearly identical to that in Web Map Service (WMS) Capabilities. It contains layer metadata such as a title, an abstract and a legend that may reflect what is advertised by the server issuing the layer. But, it is clear that a very common use of Context is to change the name and the description to allow either internationalization, user refinement, or eventually, a completely user-defined description.
  • Some information concerning the current state of the layer within the WMS Context is also held there. The Layer element contains a binary attribute “hidden” which, if non-zero, instructs the client that, despite the layer being within the Context, it must not be displayed. A client should also provide a means for the user to know that such a layer exists and a means to make that layer visible.
  • The Layer element contains information about the server it is issued from, and some information about the format in which that layer may be asked for by a client. It also may contain several styles that should be presented to the client to allow different presentations of the map, one of these styles being advertised as the currently selected one.
  • The Version attribute specifies the ViewContext specification revision to which this XML Schema applies.

XML Encoding

The XML encoding of a Context Document is given in the OGC® WMC Specification, which defines the required and optional content of the Context Document and how the document is formatted. 

Description of a Context Collection

Context Collections represent a list of Context Documents. Context Collections may be used in several ways:

  • A particular Viewer Client could use a Collection to construct a menu of default start-up views.
  • A Collection of related Context Documents could serve as a script for a demonstration.
  • A client could create a Collection to "bookmark" public or user-specific Contexts. The creation of such a Collection might be managed by the Viewer Client itself.

Uses for WMC Documents

Web Map Context Documents are human-readable XML documents which may result from a search of WMS layers. They can be transmitted as static documents.

Typical ScenarioA user produces a custom map view of a geographic area of interest from one or more WMS instances. The user then saves or stores the state of the map in the application as a Web Map Context Document. Another Viewer Client could then access the Web Map Context Document and display the map in the look and feel of the respective application. As a result, a single application-neutral Context Document can be used by an infinite number of Viewer Clients and applications.

Report a problem on this page
Please select all that apply:

Thank you for your help!

You will not receive a reply. For enquiries, contact us.

Date modified: