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
OpenLayers.Format.GMLRead/Wite GML.
Properties
featureNS{String} Namespace used for feature attributes.
featurePrefix{String} Namespace alias (or prefix) for feature nodes.
featureName{String} Element name for features.
layerName{String} Name of data layer.
geometryName{String} Name of geometry element.
collectionName{String} Name of featureCollection element.
gmlns{String} GML Namespace.
extractAttributes{Boolean} Extract attributes from GML.
xy{Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.
Constructor
OpenLayers.Format.GMLCreate a new parser for GML.
Functions
readRead data from a string, and return a list of features.
writeGenerate a GML document string given a list of features.
buildGeometryNode

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”.

geometryName

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

collectionName

{String} Name of featureCollection element.

gmlns

{String} GML Namespace.

extractAttributes

{Boolean} Extract attributes from GML.

xy

{Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.

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.
Close