OpenLayers.Format.WMC

Read and write Web Map Context documents.

Inherits from

Summary
OpenLayers.Format.WMCRead and write Web Map Context documents.
Properties
defaultVersion{String} Version number to assume if none found.
version{String} Specify a version string if one is known.
Constructor
OpenLayers.Format.WMCCreate a new parser for WMC docs.
Functions
readRead WMC data from a string, and return an object with map properties and a list of layers.
writeWrite a WMC document given a map.

Properties

defaultVersion

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

version

{String} Specify a version string if one is known.

Constructor

OpenLayers.Format.WMC

Create a new parser for WMC docs.

Parameters

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

Functions

read

read: function(data,
options)

Read WMC data from a string, and return an object with map properties and a list of layers.

Parameters

data{String} or {DOMElement} data to read/parse.
options{Object} The options object must contain a map property.  If the map property is a string, it must be the id of a dom element where the new map will be placed.  If the map property is an OpenLayers.Map, the layers from the context document will be added to the map.

Returns

{OpenLayers.Map} A map based on the context.

write

write: function(obj,
options)

Write a WMC document given a map.

Parameters

obj{OpenLayers.Map | Object} A map or context object.
options{Object} Optional configuration object.

Returns

{String} A WMC document string.

read: function(data,
options)
Read WMC data from a string, and return an object with map properties and a list of layers.
write: function(obj,
options)
Write a WMC document given a map.
Read and write XML.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Close