OpenLayers. Format.GML

Read/Wite GML.  Create a new instance with the OpenLayers.Format.GML constructor.  Supports the GML simple features profile.

Inherits from

Summary
Read/Wite GML.
{String} Namespace used for feature attributes.
{String} Namespace alias (or prefix) for feature nodes.
{String} Element name for features.
{String} Name of data layer.
{String} Name of geometry element.
{String} Name of featureCollection element.
{String} GML Namespace.
{Boolean} Extract attributes from GML.
Create a new parser for GML.
Read data from a string, and return a list of features.
Generate a GML document string given a list of features.

Properties

featureNS

{String} Namespace used for feature attributes.  Default is “http://mapserver.gis.umn.edu/mapserver".

featurePrefix

{String} Namespace alias (or prefix) for feature nodes.  Default is “feature”.

featureName

{String} Element name for features.  Default is “featureMember”.

layerName

{String} Name of data layer.  Default is “features”.

geometry

{String} Name of geometry element.  Defaults to “geometry”.

collectionName

{String} Name of featureCollection element.

gmlns

{String} GML Namespace.

extractAttributes

{Boolean} Extract attributes from GML.

Constructor

OpenLayers. Format.GML

Create a new parser for GML.

Parameters

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

Functions

read

read: function(data)

Read data from a string, and return a list of features.

Parameters

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

Returns

{Array(OpenLayers.Feature.Vector)} An array of features.

write

write: function(features)

Generate a GML document string given a list of features.

Parameters

features{Array(OpenLayers.Feature.Vector)} List of features to serialize into a string.

Returns

{String} A string representing the GML document.

buildGeometryNode

buildGeometryNode: function(geometry)
read: function(data)
Read data from a string, and return a list of features.
write: function(features)
Generate a GML document string given a list of features.
buildGeometryNode: function(geometry)
Create a new parser for GML.
Base class for format reading/writing a variety of formats.
Vector features use the OpenLayers.Geometry classes as geometry description.