OpenLayers. Format. Context

Base class for both Format.WMC and Format.OWSContext

Inherits from

Summary
OpenLayers. Format. Context Base class for both Format.WMC and Format.OWSContext
Constructor
OpenLayers. Format. Context Create a new parser for Context documents.
Functions
read Read Context data from a string, and return an object with map properties and a list of layers.
write Write a context document given a map.
Constants
OpenLayers. Format. Context. serviceTypes Enumeration for service types

Constructor

OpenLayers. Format. Context

Create a new parser for Context documents.

Parameters

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

Functions

read

read: function( data,
options )

Read Context 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 context document given a map.

Parameters

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

Returns

{String} A context document string.

Constants

OpenLayers. Format. Context. serviceTypes

Enumeration for service types

read: function( data,
options )
Read Context data from a string, and return an object with map properties and a list of layers.
write: function( obj,
options )
Write a context document given a map.
Base class for versioned formats, i.e.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Close