# OpenLayers.Format.WMC

Read and write Web Map Context documents.

#### Inherits from

- OpenLayers.Format.XML

Summary

OpenLayers.Format.WMC | Read and write Web Map Context documents.
Properties |
defaultVersion | {String} Version number to assume if none found.
Constructor |
OpenLayers.Format.WMC | Create a new parser for Web Map Context documents.
Functions |
layerToContext | Create a layer context object given a wms layer object.
toContext | Create a context object free from layer given a map or a context object.

### Properties

### defaultVersion

{String} Version number to assume if none found. Default is “1.1.0”.

### Constructor

### OpenLayers.Format.WMC

Create a new parser for Web Map Context documents.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### Functions

### layerToContext

> layerToContext: function( | layer | )

Create a layer context object given a wms layer object.

#### Parameters

obj | {OpenLayers.Layer.WMS} The layer.

#### Returns

{Object} A layer context object.

### toContext

> toContext: function( | obj | )

Create a context object free from layer given a map or a context object.

#### Parameters

obj | {OpenLayers.Map | Object} The map or context.

#### Returns

{Object} A context object.

> layerToContext: function( | layer | )

Create a layer context object given a wms layer object.

> toContext: function( | obj | )

Create a context object free from layer given a map or a context object.
Read and write XML.
Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Close