OpenLayers.Format.WMC.v1 - OpenLayers

# OpenLayers. Format. WMC.v1

Superclass for WMC version 1 parsers.

#### Inherits from

- OpenLayers.Format.XML

Summary

OpenLayers. Format. WMC.v1 | Superclass for WMC version 1 parsers.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
schemaLocation | {String} Schema location for a particular minor version.
getNamespacePrefix | Get the namespace prefix for a given uri from the namespaces object.
defaultPrefix |
rootPrefix | {String} Prefix on the root node that maps to the context namespace URI.
defaultStyleName | {String} Style name used if layer has no style param.
defaultStyleTitle | {String} Default style title.
Constructor |
OpenLayers. Format. WMC.v1 | Instances of this class are not created directly.
Functions |
read | Read capabilities data from a string, and return a list of layers.
runChildNodes |
read_wmc_General |
read_wmc_BoundingBox |
read_wmc_LayerList |
read_wmc_Layer |
getLayerFromInfo | Create a WMS layer from a layerInfo object.
read_wmc_Extension |
read_ol_units |
read_ol_maxExtent |
read_ol_transparent |
read_ol_numZoomLevels |
read_ol_opacity |
read_ol_singleTile |
read_ol_isBaseLayer |
read_ol_displayInLayerSwitcher |
read_wmc_Server |
read_wmc_FormatList |
read_wmc_Format |
read_wmc_StyleList |
read_wmc_Style |
read_wmc_SLD |
read_sld_StyledLayerDescriptor |
read_wmc_OnlineResource |
read_wmc_Name |
read_wmc_Title |
read_wmc_MetadataURL |
read_wmc_Abstract |
read_wmc_LatLonBoundingBox |
read_wmc_LegendURL |
write |
createElementDefaultNS | Shorthand for createElementNS with namespace from defaultPrefix.
setAttributes | Set multiple attributes given key value pairs from an object.
write_wmc_General | Create a General node given an context object.
write_ol_MapExtension |
write_wmc_LayerList | Create a LayerList node given an context object.
write_wmc_Layer | Create a Layer node given a layer object.
write_wmc_LayerExtension | Add OpenLayers specific layer parameters to an Extension element.
createOLPropertyNode | Create a node representing an OpenLayers property.
write_wmc_Server | Create a Server node given a layer object.
write_wmc_MetadataURL | Create a MetadataURL node given a layer object.
write_wmc_FormatList | Create a FormatList node given a layer.
write_wmc_StyleList | Create a StyleList node given a layer.
write_wmc_OnlineResource | Create an OnlineResource node given a URL.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### schemaLocation

{String} Schema location for a particular minor version.

### getNamespacePrefix

> getNamespacePrefix: function( | uri | )

Get the namespace prefix for a given uri from the namespaces object.

#### Returns

{String} A namespace prefix or null if none found.

### defaultPrefix

### rootPrefix

{String} Prefix on the root node that maps to the context namespace URI.

### defaultStyleName

{String} Style name used if layer has no style param. Default is “”.

### defaultStyleTitle

{String} Default style title. Default is “Default”.

### Constructor

### OpenLayers. Format. WMC.v1

Instances of this class are not created directly. Use the OpenLayers.Format.WMC constructor instead.

#### Parameters

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

### Functions

### read

> read: function( | data | )

Read capabilities data from a string, and return a list of layers.

#### Parameters

data | {String} or {DOMElement} data to read/parse.

#### Returns

{Array} List of named layers.

### runChildNodes

> runChildNodes: function( | obj,
> | node | )

### read_wmc_General

> read_wmc_General: function( | context,
> | node | )

### read_wmc_BoundingBox

> read_wmc_BoundingBox: function( | context,
> | node | )

### read_wmc_LayerList

> read_wmc_LayerList: function( | context,
> | node | )

### read_wmc_Layer

> read_wmc_Layer: function( | context,
> | node | )

### getLayerFromInfo

> getLayerFromInfo: function( | layerInfo | )

Create a WMS layer from a layerInfo object.

#### Parameters

layerInfo | {Object} An object representing a WMS layer.

#### Returns

{OpenLayers.Layer.WMS} A WMS layer.

### read_wmc_Extension

> read_wmc_Extension: function( | obj,
> | node | )

### read_ol_units

> read_ol_units: function( | layerInfo,
> | node | )

### read_ol_maxExtent

> read_ol_maxExtent: function( | obj,
> | node | )

### read_ol_transparent

> read_ol_transparent: function( | layerInfo,
> | node | )

### read_ol_numZoomLevels

> read_ol_numZoomLevels: function( | layerInfo,
> | node | )

### read_ol_opacity

> read_ol_opacity: function( | layerInfo,
> | node | )

### read_ol_singleTile

> read_ol_singleTile: function( | layerInfo,
> | node | )

### read_ol_isBaseLayer

> read_ol_isBaseLayer: function( | layerInfo,
> | node | )

### read_ol_displayInLayerSwitcher

> read_ol_displayInLayerSwitcher: function( | layerInfo,
> | node | )

### read_wmc_Server

> read_wmc_Server: function( | layerInfo,
> | node | )

### read_wmc_FormatList

> read_wmc_FormatList: function( | layerInfo,
> | node | )

### read_wmc_Format

> read_wmc_Format: function( | layerInfo,
> | node | )

### read_wmc_StyleList

> read_wmc_StyleList: function( | layerInfo,
> | node | )

### read_wmc_Style

> read_wmc_Style: function( | layerInfo,
> | node | )

### read_wmc_SLD

> read_wmc_SLD: function( | style,
> | node | )

### read_sld_StyledLayerDescriptor

> read_sld_StyledLayerDescriptor: function( | sld,
> | node | )

### read_wmc_OnlineResource

> read_wmc_OnlineResource: function( | obj,
> | node | )

### read_wmc_Name

> read_wmc_Name: function( | obj,
> | node | )

### read_wmc_Title

> read_wmc_Title: function( | obj,
> | node | )

### read_wmc_MetadataURL

> read_wmc_MetadataURL: function( | layerInfo,
> | node | )

### read_wmc_Abstract

> read_wmc_Abstract: function( | obj,
> | node | )

### read_wmc_LatLonBoundingBox

> read_wmc_LatLonBoundingBox: function( | layer,
> | node | )

### read_wmc_LegendURL

> read_wmc_LegendURL: function( | style,
> | node | )

### write

> write: function( | context,
> | options | )

#### Parameters

context | {Object} An object representing the map context.
options | {Object} Optional object.

#### Returns

{String} A WMC document string.

### createElementDefaultNS

> createElementDefaultNS: function( | name,
> | childValue,
> | attributes | )

Shorthand for createElementNS with namespace from defaultPrefix. Can optionally be used to set attributes and a text child value.

#### Parameters

name | {String} The qualified node name.
childValue | {String} Optional value for text child node.
attributes | {Object} Optional object representing attributes.

#### Returns

{Element} An element node.

### setAttributes

> setAttributes: function( | node,
> | obj | )

Set multiple attributes given key value pairs from an object.

#### Parameters

node | {Element} An element node.
obj | {Object} An object whose properties represent attribute names and values represent attribute values.

### write_wmc_General

> write_wmc_General: function( | context | )

Create a General node given an context object.

#### Parameters

context | {Object} Context object.

#### Returns

{Element} A WMC General element node.

### write_ol_MapExtension

> write_ol_MapExtension: function( | context | )

### write_wmc_LayerList

> write_wmc_LayerList: function( | context | )

Create a LayerList node given an context object.

#### Parameters

context | {Object} Context object.

#### Returns

{Element} A WMC LayerList element node.

### write_wmc_Layer

> write_wmc_Layer: function( | layer | )

Create a Layer node given a layer object.

#### Parameters

layer | {OpenLayers.Layer.WMS} Layer object.

#### Returns

{Element} A WMC Layer element node.

### write_wmc_LayerExtension

> write_wmc_LayerExtension: function( | layer | )

Add OpenLayers specific layer parameters to an Extension element.

#### Parameters

layer | {OpenLayers.Layer.WMS} A WMS layer.

#### Returns

{Element} A WMC Extension element (for a layer).

### createOLPropertyNode

> createOLPropertyNode: function( | obj,
> | prop | )

Create a node representing an OpenLayers property. If the property is null or undefined, null will be returned.

#### Parameters

object | {Object} An object.
prop | {String} A property.

#### Returns

{Element} A property node.

### write_wmc_Server

> write_wmc_Server: function( | layer | )

Create a Server node given a layer object.

#### Parameters

layer | {OpenLayers.Layer.WMS} Layer object.

#### Returns

{Element} A WMC Server element node.

### write_wmc_MetadataURL

> write_wmc_MetadataURL: function( | layer | )

Create a MetadataURL node given a layer object.

#### Parameters

layer | {OpenLayers.Layer.WMS} Layer object.

#### Returns

{Element} A WMC metadataURL element node.

### write_wmc_FormatList

> write_wmc_FormatList: function( | layer | )

Create a FormatList node given a layer.

#### Parameters

layer | {OpenLayers.Layer.WMS} Layer object.

#### Returns

{Element} A WMC FormatList element node.

### write_wmc_StyleList

> write_wmc_StyleList: function( | layer | )

Create a StyleList node given a layer.

#### Parameters

layer | {OpenLayers.Layer.WMS} Layer object.

#### Returns

{Element} A WMC StyleList element node.

### write_wmc_OnlineResource

> write_wmc_OnlineResource: function( | href | )

Create an OnlineResource node given a URL.

#### Parameters

href | {String} URL for the resource.

#### Returns

{Element} A WMC OnlineResource element node.

> getNamespacePrefix: function( | uri | )

Get the namespace prefix for a given uri from the namespaces object.
{Object} Mapping of namespace aliases to namespace URIs.

> read: function( | data | )

Read capabilities data from a string, and return a list of layers.

> runChildNodes: function( | obj,
> | node | )

> read_wmc_General: function( | context,
> | node | )

> read_wmc_BoundingBox: function( | context,
> | node | )

> read_wmc_LayerList: function( | context,
> | node | )

> read_wmc_Layer: function( | context,
> | node | )

> getLayerFromInfo: function( | layerInfo | )

Create a WMS layer from a layerInfo object.

> read_wmc_Extension: function( | obj,
> | node | )

> read_ol_units: function( | layerInfo,
> | node | )

> read_ol_maxExtent: function( | obj,
> | node | )

> read_ol_transparent: function( | layerInfo,
> | node | )

> read_ol_numZoomLevels: function( | layerInfo,
> | node | )

> read_ol_opacity: function( | layerInfo,
> | node | )

> read_ol_singleTile: function( | layerInfo,
> | node | )

> read_ol_isBaseLayer: function( | layerInfo,
> | node | )

> read_ol_displayInLayerSwitcher: function( | layerInfo,
> | node | )

> read_wmc_Server: function( | layerInfo,
> | node | )

> read_wmc_FormatList: function( | layerInfo,
> | node | )

> read_wmc_Format: function( | layerInfo,
> | node | )

> read_wmc_StyleList: function( | layerInfo,
> | node | )

> read_wmc_Style: function( | layerInfo,
> | node | )

> read_wmc_SLD: function( | style,
> | node | )

> read_sld_StyledLayerDescriptor: function( | sld,
> | node | )

> read_wmc_OnlineResource: function( | obj,
> | node | )

> read_wmc_Name: function( | obj,
> | node | )

> read_wmc_Title: function( | obj,
> | node | )

> read_wmc_MetadataURL: function( | layerInfo,
> | node | )

> read_wmc_Abstract: function( | obj,
> | node | )

> read_wmc_LatLonBoundingBox: function( | layer,
> | node | )

> read_wmc_LegendURL: function( | style,
> | node | )

> write: function( | context,
> | options | )

> createElementDefaultNS: function( | name,
> | childValue,
> | attributes | )

Shorthand for createElementNS with namespace from defaultPrefix.

> setAttributes: function( | node,
> | obj | )

Set multiple attributes given key value pairs from an object.

> write_wmc_General: function( | context | )

Create a General node given an context object.

> write_ol_MapExtension: function( | context | )

> write_wmc_LayerList: function( | context | )

Create a LayerList node given an context object.

> write_wmc_Layer: function( | layer | )

Create a Layer node given a layer object.

> write_wmc_LayerExtension: function( | layer | )

Add OpenLayers specific layer parameters to an Extension element.

> createOLPropertyNode: function( | obj,
> | prop | )

Create a node representing an OpenLayers property.

> write_wmc_Server: function( | layer | )

Create a Server node given a layer object.

> write_wmc_MetadataURL: function( | layer | )

Create a MetadataURL node given a layer object.

> write_wmc_FormatList: function( | layer | )

Create a FormatList node given a layer.

> write_wmc_StyleList: function( | layer | )

Create a StyleList node given a layer.

> write_wmc_OnlineResource: function( | href | )

Create an OnlineResource node given a URL.
Read and write XML.
Read and write Web Map Context documents.
Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services.
Close