Fix TypeScript errors in ol/format/GML
This commit is contained in:
@@ -179,7 +179,7 @@ class GML2 extends GMLBase {
|
||||
writeFeatureElement(node, feature, objectStack) {
|
||||
const fid = feature.getId();
|
||||
if (fid) {
|
||||
node.setAttribute('fid', fid);
|
||||
node.setAttribute('fid', /** @type {string} */ (fid));
|
||||
}
|
||||
const context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
const featureNS = context['featureNS'];
|
||||
@@ -285,7 +285,7 @@ class GML2 extends GMLBase {
|
||||
writeGeometryElement(node, geometry, objectStack) {
|
||||
const context = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[objectStack.length - 1]);
|
||||
const item = assign({}, context);
|
||||
item.node = node;
|
||||
item['node'] = node;
|
||||
let value;
|
||||
if (Array.isArray(geometry)) {
|
||||
if (context.dataProjection) {
|
||||
@@ -588,9 +588,9 @@ class GML2 extends GMLBase {
|
||||
/**
|
||||
* @const
|
||||
* @type {Object<string, Object<string, import("../xml.js").Parser>>}
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
|
||||
GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {
|
||||
'http://www.opengis.net/gml': {
|
||||
'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates_)
|
||||
}
|
||||
@@ -599,9 +599,9 @@ GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
|
||||
/**
|
||||
* @const
|
||||
* @type {Object<string, Object<string, import("../xml.js").Parser>>}
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
|
||||
GML2.prototype.FLAT_LINEAR_RINGS_PARSERS = {
|
||||
'http://www.opengis.net/gml': {
|
||||
'innerBoundaryIs': GML2.prototype.innerBoundaryIsParser_,
|
||||
'outerBoundaryIs': GML2.prototype.outerBoundaryIsParser_
|
||||
@@ -623,9 +623,9 @@ GML2.prototype.BOX_PARSERS_ = {
|
||||
/**
|
||||
* @const
|
||||
* @type {Object<string, Object<string, import("../xml.js").Parser>>}
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
GML2.prototype.GEOMETRY_PARSERS_ = {
|
||||
GML2.prototype.GEOMETRY_PARSERS = {
|
||||
'http://www.opengis.net/gml': {
|
||||
'Point': makeReplacer(GMLBase.prototype.readPoint),
|
||||
'MultiPoint': makeReplacer(
|
||||
|
||||
Reference in New Issue
Block a user