Named export from ol/format/GMLBase

This commit is contained in:
Tim Schaub
2018-02-19 09:26:16 -07:00
parent 67e5ba6afa
commit 7b21b41151
4 changed files with 22 additions and 21 deletions
+10 -9
View File
@@ -21,6 +21,14 @@ import {assign} from '../obj.js';
import {get as getProjection} from '../proj.js';
import {getAllTextContent, getAttributeNS, makeArrayPusher, makeReplacer, parseNode, pushParseAndPop} from '../xml.js';
/**
* @const
* @type {string}
*/
export const GMLNS = 'http://www.opengis.net/gml';
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -67,7 +75,7 @@ const GMLBase = function(opt_options) {
* @type {Object.<string, Object.<string, Object>>}
*/
this.FEATURE_COLLECTION_PARSERS = {};
this.FEATURE_COLLECTION_PARSERS[GMLBase.GMLNS] = {
this.FEATURE_COLLECTION_PARSERS[GMLNS] = {
'featureMember': makeReplacer(GMLBase.prototype.readFeaturesInternal),
'featureMembers': makeReplacer(GMLBase.prototype.readFeaturesInternal)
};
@@ -78,13 +86,6 @@ const GMLBase = function(opt_options) {
inherits(GMLBase, XMLFeature);
/**
* @const
* @type {string}
*/
GMLBase.GMLNS = 'http://www.opengis.net/gml';
/**
* A regular expression that matches if a string only contains whitespace
* characters. It will e.g. match `''`, `' '`, `'\n'` etc. The non-breaking
@@ -215,7 +216,7 @@ GMLBase.prototype.readGeometryElement = function(node, objectStack) {
*/
GMLBase.prototype.readFeatureElement = function(node, objectStack) {
let n;
const fid = node.getAttribute('fid') || getAttributeNS(node, GMLBase.GMLNS, 'id');
const fid = node.getAttribute('fid') || getAttributeNS(node, GMLNS, 'id');
const values = {};
let geometryName;
for (n = node.firstElementChild; n; n = n.nextElementSibling) {