Read and write Web Map Context documents.
OpenLayers. Format.WMC | Read 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.WMC | Create a new parser for WMC docs. |
Functions | |
read | Read WMC data from a string, and return an object with map properties and a list of layers. |
write | Write a WMC document given a map. |
read: function( data, options )
Read WMC data from a string, and return an object with map properties and a list of layers.
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. |
{OpenLayers.Map} A map based on the context.
write: function( obj, options )
Write a WMC document given a map.
obj | {OpenLayers.Map | Object} A map or context object. |
options | {Object} Optional configuration object. |
{String} A WMC document string.
Read WMC data from a string, and return an object with map properties and a list of layers.
read: function( data, options )
Write a WMC document given a map.
write: function( obj, options )