Class: GML

GML

Feature format for reading and writing data in the GML format.

new ol.format.GML(opt_options) experimental

Name Type Description
options optional

Optional configuration object.

Name Type Description
featureNS string

Feature namespace.

featureType string

Feature type to parse.

srsName string

srsName to use when writing geometries.

surface boolean | undefined optional

Write gml:Surface instead of gml:Polygon elements. This also affects the elements in multi-part geometries. Default is false.

curve boolean | undefined optional

Write gml:Curve instead of gml:LineString elements. This also affects the elements in multi-part geometries. Default is false.

multiCurve boolean | undefined optional

Write gml:MultiCurve instead of gml:MultiLineString. Since the latter is deprecated in GML 3, the default is true.

multiSurface boolean | undefined optional

Write gml:multiSurface instead of gml:MultiPolygon. Since the latter is deprecated in GML 3, the default is true.

schemaLocation string | undefined optional

Optional schemaLocation to use when writing out the GML, this will override the default provided.

Extends

Methods

readFeatures(source){Array.<ol.Feature>} experimental

Read all features from a GML FeatureCollection.

Name Type Description
source ArrayBuffer | Document | Node | Object | string

Source.

Returns:
Features.

writeFeatures(features){ArrayBuffer|Node|Object|string} experimental

Encode an array of features in GML 3.1.1 Simple Features.

Name Type Description
features Array.<ol.Feature>

Features.

Returns:
Result.