OpenLayers.Format.GML.v3

Parses GML version 3.

Inherits from

Summary
OpenLayers.Format.GML.v3Parses GML version 3.
Properties
schemaLocation{String} Schema location for a particular minor version.
curve{Boolean} Write gml:Curve instead of gml:LineString elements.
multiCurve{Boolean} Write gml:MultiCurve instead of gml:MultiLineString.
surface{Boolean} Write gml:Surface instead of gml:Polygon elements.
multiSurface{Boolean} Write gml:multiSurface instead of gml:MultiPolygon.
Constructor
OpenLayers.Format.GML.v3Create a parser for GML v3.
Properties and Functions
readersContains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write
writersAs a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
setGeometryTypesSets the <geometryTypes> mapping.

Properties

schemaLocation

{String} Schema location for a particular minor version.  The writers conform with the Simple Features Profile for GML.

curve

{Boolean} Write gml:Curve instead of gml:LineString elements.  This also affects the elements in multi-part geometries.  Default is false.  To write gml:Curve elements instead of gml:LineString, set curve to true in the options to the contstructor (cannot be changed after instantiation).

multiCurve

{Boolean} Write gml:MultiCurve instead of gml:MultiLineString.  Since the latter is deprecated in GML 3, the default is true.  To write gml:MultiLineString instead of gml:MultiCurve, set multiCurve to false in the options to the constructor (cannot be changed after instantiation).

surface

{Boolean} Write gml:Surface instead of gml:Polygon elements.  This also affects the elements in multi-part geometries.  Default is false.  To write gml:Surface elements instead of gml:Polygon, set surface to true in the options to the contstructor (cannot be changed after instantiation).

multiSurface

{Boolean} Write gml:multiSurface instead of gml:MultiPolygon.  Since the latter is deprecated in GML 3, the default is true.  To write gml:MultiPolygon instead of gml:multiSurface, set multiSurface to false in the options to the constructor (cannot be changed after instantiation).

Constructor

OpenLayers.Format.GML.v3

Create a parser for GML v3.

Parameters

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

Valid options properties

featureType{String} Local (without prefix) feature typeName (required).
featureNS{String} Feature namespace (required).
geometryName{String} Geometry element name.

Properties and Functions

readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.  The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

write

write: function(features)

Parameters

features{Array(OpenLayers.Feature.Vector) | OpenLayers.Feature.Vector} An array of features or a single feature.

Returns

{String} Given an array of features, a doc with a gml:featureMembers element will be returned.  Given a single feature, a doc with a gml:featureMember element will be returned.

writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

setGeometryTypes

setGeometryTypes: function()

Sets the <geometryTypes> mapping.

write: function(features)
setGeometryTypes: function()
Sets the geometryTypes mapping.
Superclass for GML parsers.
Vector features use the OpenLayers.Geometry classes as geometry description.
Close