Read/Wite GML. Create a new instance with the OpenLayers.Format.GML constructor. Supports the GML simple features profile.
OpenLayers. | Read/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. | Create a new parser for GML. |
Functions and Properties | |
read | Read data from a string, and return a list of features. |
parseFeature | This function is the core of the GML parsing code in OpenLayers. |
parseGeometry | Properties of this object are the functions that parse geometries based on their type. |
parseGeometry. | Given a GML node representing a point geometry, create an OpenLayers point geometry. |
parseGeometry. | Given a GML node representing a multipoint geometry, create an OpenLayers multipoint geometry. |
parseGeometry. | Given a GML node representing a linestring geometry, create an OpenLayers linestring geometry. |
parseGeometry. | Given a GML node representing a multilinestring geometry, create an OpenLayers multilinestring geometry. |
parseGeometry. | Given a GML node representing a polygon geometry, create an OpenLayers polygon geometry. |
parseGeometry. | Given a GML node representing a multipolygon geometry, create an OpenLayers multipolygon geometry. |
parseGeometry.box | Given a GML node representing a box geometry, create an OpenLayers.Bounds. |
parseAttributes | |
write | Generate a GML document string given a list of features. |
createFeatureXML | Accept an OpenLayers.Feature.Vector, and build a GML node for it. |
buildGeometryNode | |
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type. |
buildGeometry. | Given an OpenLayers point geometry, create a GML point. |
buildGeometry. | Given an OpenLayers multipoint geometry, create a GML multipoint. |
buildGeometry. | Given an OpenLayers linestring geometry, create a GML linestring. |
buildGeometry. | Given an OpenLayers multilinestring geometry, create a GML multilinestring. |
buildGeometry. | Given an OpenLayers linearring geometry, create a GML linearring. |
buildGeometry. | Given an OpenLayers polygon geometry, create a GML polygon. |
buildGeometry. | Given an OpenLayers multipolygon geometry, create a GML multipolygon. |
buildGeometry. | Given an OpenLayers bounds, create a GML box. |
buildCoordinates | builds the coordinates XmlNode |
{String} Namespace used for feature attributes. Default is “http://mapserver.gis.umn.edu/mapserver”.
read: function( data )
Read data from a string, and return a list of features.
data | {String} or {DOMElement} data to read/parse. |
{Array(OpenLayers.Feature.Vector)} An array of features.
Given a GML node representing a point geometry, create an OpenLayers point geometry.
node | {DOMElement} A GML node. |
{OpenLayers.Geometry.Point} A point geometry.
Given a GML node representing a multipoint geometry, create an OpenLayers multipoint geometry.
node | {DOMElement} A GML node. |
{OpenLayers.Geometry.MultiPoint} A multipoint geometry.
Given a GML node representing a linestring geometry, create an OpenLayers linestring geometry.
node | {DOMElement} A GML node. |
{OpenLayers.Geometry.LineString} A linestring geometry.
Given a GML node representing a multilinestring geometry, create an OpenLayers multilinestring geometry.
node | {DOMElement} A GML node. |
{OpenLayers.Geometry.MultiLineString} A multilinestring geometry.
Given a GML node representing a polygon geometry, create an OpenLayers polygon geometry.
node | {DOMElement} A GML node. |
{OpenLayers.Geometry.Polygon} A polygon geometry.
Given a GML node representing a multipolygon geometry, create an OpenLayers multipolygon geometry.
node | {DOMElement} A GML node. |
{OpenLayers.Geometry.MultiPolygon} A multipolygon geometry.
Given a GML node representing a box geometry, create an OpenLayers.Bounds.
node | {DOMElement} A GML node. |
{OpenLayers.Bounds} A bounds representing the box.
write: function( features )
Generate a GML document string given a list of features.
features | {Array(OpenLayers.Feature.Vector)} List of features to serialize into a string. |
{String} A string representing the GML document.
createFeatureXML: function( feature )
Accept an OpenLayers.Feature.Vector, and build a GML node for it.
feature | {OpenLayers.Feature.Vector} The feature to be built as GML. |
{DOMElement} A node reprensting the feature in GML.
Given an OpenLayers point geometry, create a GML point.
geometry | {OpenLayers.Geometry.Point} A point geometry. |
{DOMElement} A GML point node.
Given an OpenLayers multipoint geometry, create a GML multipoint.
geometry | {OpenLayers.Geometry.MultiPoint} A multipoint geometry. |
{DOMElement} A GML multipoint node.
Given an OpenLayers linestring geometry, create a GML linestring.
geometry | {OpenLayers.Geometry.LineString} A linestring geometry. |
{DOMElement} A GML linestring node.
Given an OpenLayers multilinestring geometry, create a GML multilinestring.
geometry | {OpenLayers.Geometry.MultiLineString} A multilinestring geometry. |
{DOMElement} A GML multilinestring node.
Given an OpenLayers linearring geometry, create a GML linearring.
geometry | {OpenLayers.Geometry.LinearRing} A linearring geometry. |
{DOMElement} A GML linearring node.
Given an OpenLayers polygon geometry, create a GML polygon.
geometry | {OpenLayers.Geometry.Polygon} A polygon geometry. |
{DOMElement} A GML polygon node.
Given an OpenLayers multipolygon geometry, create a GML multipolygon.
geometry | {OpenLayers.Geometry.MultiPolygon} A multipolygon geometry. |
{DOMElement} A GML multipolygon node.
buildCoordinatesNode: function( geometry )
builds the coordinates XmlNode
<gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
geometry | {OpenLayers.Geometry} |
{XmlNode} created xmlNode
Read data from a string, and return a list of features.
read: function( data )
This function is the core of the GML parsing code in OpenLayers.
parseFeature: function( node )
parseAttributes: function( node )
Generate a GML document string given a list of features.
write: function( features )
Accept an OpenLayers.Feature.Vector, and build a GML node for it.
createFeatureXML: function( feature )
buildGeometryNode: function( geometry )
builds the coordinates XmlNode
buildCoordinatesNode: function( geometry )