Remove lint

This commit is contained in:
Andreas Hocevar
2021-06-28 18:10:51 +02:00
parent b5bb9382e2
commit 79f5f46d27
135 changed files with 1040 additions and 2374 deletions
+16 -13
View File
@@ -166,9 +166,9 @@ class EsriJSON extends JSONFeature {
object['spatialReference'] &&
object['spatialReference']['wkid'] !== undefined
) {
const spatialReference = /** @type {EsriJSONSpatialReferenceWkid} */ (object[
'spatialReference'
]);
const spatialReference = /** @type {EsriJSONSpatialReferenceWkid} */ (
object['spatialReference']
);
const crs = spatialReference.wkid;
return getProjection('EPSG:' + crs);
} else {
@@ -211,11 +211,10 @@ class EsriJSON extends JSONFeature {
opt_options &&
(opt_options.dataProjection || opt_options.featureProjection);
if (projection) {
object['geometry'][
'spatialReference'
] = /** @type {EsriJSONSpatialReferenceWkid} */ ({
wkid: Number(getProjection(projection).getCode().split(':').pop()),
});
object['geometry']['spatialReference'] =
/** @type {EsriJSONSpatialReferenceWkid} */ ({
wkid: Number(getProjection(projection).getCode().split(':').pop()),
});
}
delete properties[feature.getGeometryName()];
}
@@ -506,9 +505,9 @@ function writePolygonGeometry(polygon, opt_options) {
return {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
rings: /** @type {Array<Array<EsriJSONPosition>>} */ (polygon.getCoordinates(
false
)),
rings: /** @type {Array<Array<EsriJSONPosition>>} */ (
polygon.getCoordinates(false)
),
};
}
@@ -522,7 +521,9 @@ function writeMultiLineStringGeometry(multiLineString, opt_options) {
return {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
paths: /** @type {Array<Array<EsriJSONPosition>>} */ (multiLineString.getCoordinates()),
paths: /** @type {Array<Array<EsriJSONPosition>>} */ (
multiLineString.getCoordinates()
),
};
}
@@ -536,7 +537,9 @@ function writeMultiPointGeometry(multiPoint, opt_options) {
return {
hasZ: hasZM.hasZ,
hasM: hasZM.hasM,
points: /** @type {Array<EsriJSONPosition>} */ (multiPoint.getCoordinates()),
points: /** @type {Array<EsriJSONPosition>} */ (
multiPoint.getCoordinates()
),
};
}
+11 -8
View File
@@ -77,7 +77,9 @@ class GML2 extends GMLBase {
*/
readFlatCoordinates(node, objectStack) {
const s = getAllTextContent(node, false).replace(/^\s*|\s*$/g, '');
const context = /** @type {import("../xml.js").NodeStackItem} */ (objectStack[0]);
const context = /** @type {import("../xml.js").NodeStackItem} */ (
objectStack[0]
);
const containerSrs = context['srsName'];
let axisOrientation = 'enu';
if (containerSrs) {
@@ -181,7 +183,9 @@ class GML2 extends GMLBase {
const multiCurve = context['multiCurve'];
let nodeName;
if (!Array.isArray(value)) {
nodeName = /** @type {import("../geom/Geometry.js").default} */ (value).getType();
nodeName = /** @type {import("../geom/Geometry.js").default} */ (
value
).getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) {
@@ -234,9 +238,8 @@ class GML2 extends GMLBase {
}
} else {
if (!(key in context.serializers[featureNS])) {
context.serializers[featureNS][key] = makeChildAppender(
writeStringTextNode
);
context.serializers[featureNS][key] =
makeChildAppender(writeStringTextNode);
}
}
}
@@ -324,9 +327,9 @@ class GML2 extends GMLBase {
* @param {Array<*>} objectStack Node stack.
*/
writeGeometryElement(node, geometry, objectStack) {
const context = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[
objectStack.length - 1
]);
const context = /** @type {import("./Feature.js").WriteOptions} */ (
objectStack[objectStack.length - 1]
);
const item = assign({}, context);
item['node'] = node;
let value;
+8 -7
View File
@@ -797,9 +797,9 @@ class GML3 extends GMLBase {
* @param {Array<*>} objectStack Node stack.
*/
writeGeometryElement(node, geometry, objectStack) {
const context = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[
objectStack.length - 1
]);
const context = /** @type {import("./Feature.js").WriteOptions} */ (
objectStack[objectStack.length - 1]
);
const item = assign({}, context);
item['node'] = node;
let value;
@@ -866,9 +866,8 @@ class GML3 extends GMLBase {
}
} else {
if (!(key in context.serializers[featureNS])) {
context.serializers[featureNS][key] = makeChildAppender(
writeStringTextNode
);
context.serializers[featureNS][key] =
makeChildAppender(writeStringTextNode);
}
}
}
@@ -948,7 +947,9 @@ class GML3 extends GMLBase {
const multiCurve = context['multiCurve'];
let nodeName;
if (!Array.isArray(value)) {
nodeName = /** @type {import("../geom/Geometry.js").default} */ (value).getType();
nodeName = /** @type {import("../geom/Geometry.js").default} */ (
value
).getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) {
+3 -3
View File
@@ -17,9 +17,9 @@ class GML32 extends GML3 {
* @param {import("./GMLBase.js").Options} [opt_options] Optional configuration object.
*/
constructor(opt_options) {
const options = /** @type {import("./GMLBase.js").Options} */ (opt_options
? opt_options
: {});
const options = /** @type {import("./GMLBase.js").Options} */ (
opt_options ? opt_options : {}
);
super(options);
+2 -3
View File
@@ -238,9 +238,8 @@ class GMLBase extends XMLFeature {
readGeometryElement(node, objectStack) {
const context = /** @type {Object} */ (objectStack[0]);
context['srsName'] = node.firstElementChild.getAttribute('srsName');
context['srsDimension'] = node.firstElementChild.getAttribute(
'srsDimension'
);
context['srsDimension'] =
node.firstElementChild.getAttribute('srsDimension');
const geometry = pushParseAndPop(
null,
this.GEOMETRY_PARSERS,
+45 -39
View File
@@ -623,15 +623,15 @@ function parseExtensions(node, objectStack) {
function parseRtePt(node, objectStack) {
const values = pushParseAndPop({}, RTEPT_PARSERS, node, objectStack);
if (values) {
const rteValues = /** @type {!Object} */ (objectStack[
objectStack.length - 1
]);
const flatCoordinates = /** @type {Array<number>} */ (rteValues[
'flatCoordinates'
]);
const layoutOptions = /** @type {LayoutOptions} */ (rteValues[
'layoutOptions'
]);
const rteValues = /** @type {!Object} */ (
objectStack[objectStack.length - 1]
);
const flatCoordinates = /** @type {Array<number>} */ (
rteValues['flatCoordinates']
);
const layoutOptions = /** @type {LayoutOptions} */ (
rteValues['layoutOptions']
);
appendCoordinate(flatCoordinates, layoutOptions, node, values);
}
}
@@ -643,15 +643,15 @@ function parseRtePt(node, objectStack) {
function parseTrkPt(node, objectStack) {
const values = pushParseAndPop({}, TRKPT_PARSERS, node, objectStack);
if (values) {
const trkValues = /** @type {!Object} */ (objectStack[
objectStack.length - 1
]);
const flatCoordinates = /** @type {Array<number>} */ (trkValues[
'flatCoordinates'
]);
const layoutOptions = /** @type {LayoutOptions} */ (trkValues[
'layoutOptions'
]);
const trkValues = /** @type {!Object} */ (
objectStack[objectStack.length - 1]
);
const flatCoordinates = /** @type {Array<number>} */ (
trkValues['flatCoordinates']
);
const layoutOptions = /** @type {LayoutOptions} */ (
trkValues['layoutOptions']
);
appendCoordinate(flatCoordinates, layoutOptions, node, values);
}
}
@@ -676,7 +676,9 @@ function parseTrkSeg(node, objectStack) {
* @return {Feature|undefined} Track.
*/
function readRte(node, objectStack) {
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").ReadOptions} */ (
objectStack[0]
);
const values = pushParseAndPop(
{
'flatCoordinates': [],
@@ -709,7 +711,9 @@ function readRte(node, objectStack) {
* @return {Feature|undefined} Track.
*/
function readTrk(node, objectStack) {
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").ReadOptions} */ (
objectStack[0]
);
const values = pushParseAndPop(
{
'flatCoordinates': [],
@@ -745,7 +749,9 @@ function readTrk(node, objectStack) {
* @return {Feature|undefined} Waypoint.
*/
function readWpt(node, objectStack) {
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").ReadOptions} */ (
objectStack[0]
);
const values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);
if (!values) {
return undefined;
@@ -835,17 +841,17 @@ function writeWptType(node, coordinate, objectStack) {
* @param {Array<*>} objectStack Object stack.
*/
function writeRte(node, feature, objectStack) {
const options = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").WriteOptions} */ (
objectStack[0]
);
const properties = feature.getProperties();
const context = {node: node};
context['properties'] = properties;
const geometry = feature.getGeometry();
if (geometry.getType() == GeometryType.LINE_STRING) {
const lineString = /** @type {LineString} */ (transformGeometryWithOptions(
geometry,
true,
options
));
const lineString = /** @type {LineString} */ (
transformGeometryWithOptions(geometry, true, options)
);
context['geometryLayout'] = lineString.getLayout();
properties['rtept'] = lineString.getCoordinates();
}
@@ -868,18 +874,18 @@ function writeRte(node, feature, objectStack) {
* @param {Array<*>} objectStack Object stack.
*/
function writeTrk(node, feature, objectStack) {
const options = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").WriteOptions} */ (
objectStack[0]
);
const properties = feature.getProperties();
/** @type {import("../xml.js").NodeStackItem} */
const context = {node: node};
context['properties'] = properties;
const geometry = feature.getGeometry();
if (geometry.getType() == GeometryType.MULTI_LINE_STRING) {
const multiLineString = /** @type {MultiLineString} */ (transformGeometryWithOptions(
geometry,
true,
options
));
const multiLineString = /** @type {MultiLineString} */ (
transformGeometryWithOptions(geometry, true, options)
);
properties['trkseg'] = multiLineString.getLineStrings();
}
const parentNode = objectStack[objectStack.length - 1].node;
@@ -920,16 +926,16 @@ function writeTrkSeg(node, lineString, objectStack) {
* @param {Array<*>} objectStack Object stack.
*/
function writeWpt(node, feature, objectStack) {
const options = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").WriteOptions} */ (
objectStack[0]
);
const context = objectStack[objectStack.length - 1];
context['properties'] = feature.getProperties();
const geometry = feature.getGeometry();
if (geometry.getType() == GeometryType.POINT) {
const point = /** @type {Point} */ (transformGeometryWithOptions(
geometry,
true,
options
));
const point = /** @type {Point} */ (
transformGeometryWithOptions(geometry, true, options)
);
context['geometryLayout'] = point.getLayout();
writeWptType(node, point.getCoordinates(), objectStack);
}
+3 -1
View File
@@ -138,7 +138,9 @@ class GeoJSON extends JSONFeature {
/** @type {Array<import("../Feature.js").default>} */
let features = null;
if (geoJSONObject['type'] === 'FeatureCollection') {
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (
object
);
features = [];
const geoJSONFeatures = geoJSONFeatureCollection['features'];
for (let i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {
+2 -1
View File
@@ -22,7 +22,8 @@ const IGCZ = {
* @const
* @type {RegExp}
*/
const B_RECORD_RE = /^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/;
const B_RECORD_RE =
/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/;
/**
* @const
+6 -3
View File
@@ -146,9 +146,12 @@ IIIF_PROFILE_VALUES['none'] = {
},
};
const COMPLIANCE_VERSION1 = /^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/;
const COMPLIANCE_VERSION2 = /^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/;
const COMPLIANCE_VERSION3 = /(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;
const COMPLIANCE_VERSION1 =
/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/;
const COMPLIANCE_VERSION2 =
/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/;
const COMPLIANCE_VERSION3 =
/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;
function generateVersion1Options(iiifInfo) {
let levelProfile = iiifInfo.getComplianceLevelSupportedFeatures();
+33 -25
View File
@@ -538,7 +538,9 @@ class KML extends XMLFeature {
if (id !== null) {
feature.setId(id);
}
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").ReadOptions} */ (
objectStack[0]
);
const geometry = object['geometry'];
if (geometry) {
@@ -1112,7 +1114,8 @@ export function readFlatCoordinates(node) {
// The KML specification states that coordinate tuples should not include
// spaces, but we tolerate them.
s = s.replace(/\s*,\s*/g, ',');
const re = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;
const re =
/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;
let m;
while ((m = re.exec(s))) {
const x = parseFloat(m[1]);
@@ -1253,9 +1256,9 @@ function iconStyleParser(node, objectStack) {
if (!object) {
return;
}
const styleObject = /** @type {Object} */ (objectStack[
objectStack.length - 1
]);
const styleObject = /** @type {Object} */ (
objectStack[objectStack.length - 1]
);
const IconObject = 'Icon' in object ? object['Icon'] : {};
const drawIcon = !('Icon' in object) || Object.keys(IconObject).length > 0;
let src;
@@ -1468,7 +1471,8 @@ function gxCoordParser(node, objectStack) {
(objectStack[objectStack.length - 1]);
const coordinates = gxTrackObject.coordinates;
const s = getAllTextContent(node, false);
const re = /^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i;
const re =
/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i;
const m = re.exec(s);
if (m) {
const x = parseFloat(m[1]);
@@ -1840,9 +1844,9 @@ function readStyle(node, objectStack) {
}
let fillStyle =
/** @type {Fill} */
('fillStyle' in styleObject
? styleObject['fillStyle']
: DEFAULT_FILL_STYLE);
(
'fillStyle' in styleObject ? styleObject['fillStyle'] : DEFAULT_FILL_STYLE
);
const fill = /** @type {boolean|undefined} */ (styleObject['fill']);
if (fill !== undefined && !fill) {
fillStyle = null;
@@ -1857,14 +1861,16 @@ function readStyle(node, objectStack) {
}
const textStyle =
/** @type {Text} */
('textStyle' in styleObject
? styleObject['textStyle']
: DEFAULT_TEXT_STYLE);
(
'textStyle' in styleObject ? styleObject['textStyle'] : DEFAULT_TEXT_STYLE
);
const strokeStyle =
/** @type {Stroke} */
('strokeStyle' in styleObject
? styleObject['strokeStyle']
: DEFAULT_STROKE_STYLE);
(
'strokeStyle' in styleObject
? styleObject['strokeStyle']
: DEFAULT_STROKE_STYLE
);
const outline = /** @type {boolean|undefined} */ (styleObject['outline']);
if (outline !== undefined && !outline) {
// if the polystyle specifies no outline two styles are needed,
@@ -1992,9 +1998,9 @@ const DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {
function dataParser(node, objectStack) {
const name = node.getAttribute('name');
parseNode(DATA_PARSERS, node, objectStack);
const featureObject = /** @type {Object} */ (objectStack[
objectStack.length - 1
]);
const featureObject = /** @type {Object} */ (
objectStack[objectStack.length - 1]
);
if (name && featureObject.displayName) {
featureObject[name] = {
value: featureObject.value,
@@ -2115,9 +2121,9 @@ function simpleDataParser(node, objectStack) {
const name = node.getAttribute('name');
if (name !== null) {
const data = readString(node);
const featureObject = /** @type {Object} */ (objectStack[
objectStack.length - 1
]);
const featureObject = /** @type {Object} */ (
objectStack[objectStack.length - 1]
);
featureObject[name] = data;
}
}
@@ -2151,9 +2157,9 @@ function latLonAltBoxParser(node, objectStack) {
if (!object) {
return;
}
const regionObject = /** @type {Object} */ (objectStack[
objectStack.length - 1
]);
const regionObject = /** @type {Object} */ (
objectStack[objectStack.length - 1]
);
const extent = [
parseFloat(object['west']),
parseFloat(object['south']),
@@ -3078,7 +3084,9 @@ function writePlacemark(node, feature, objectStack) {
}
// serialize geometry
const options = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").WriteOptions} */ (
objectStack[0]
);
let geometry = feature.getGeometry();
if (geometry) {
geometry = transformGeometryWithOptions(geometry, true, options);
+6 -5
View File
@@ -234,8 +234,9 @@ class MVT extends FeatureFormat {
? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends)
: null;
}
const ctor = /** @type {typeof import("../Feature.js").default} */ (this
.featureClass_);
const ctor = /** @type {typeof import("../Feature.js").default} */ (
this.featureClass_
);
feature = new ctor();
if (this.geometryName_) {
feature.setGeometryName(this.geometryName_);
@@ -266,9 +267,9 @@ class MVT extends FeatureFormat {
*/
readFeatures(source, opt_options) {
const layers = this.layers_;
const options = /** @type {import("./Feature.js").ReadOptions} */ (this.adaptOptions(
opt_options
));
const options = /** @type {import("./Feature.js").ReadOptions} */ (
this.adaptOptions(opt_options)
);
const dataProjection = get(options.dataProjection);
dataProjection.setWorldExtent(options.extent);
options.dataProjection = dataProjection;
+3 -1
View File
@@ -122,7 +122,9 @@ const NODE_PARSERS = makeStructureNS(NAMESPACE_URIS, {
* @param {Array<*>} objectStack Object stack.
*/
function readNode(node, objectStack) {
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
const options = /** @type {import("./Feature.js").ReadOptions} */ (
objectStack[0]
);
const state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
const id = node.getAttribute('id');
/** @type {import("../coordinate.js").Coordinate} */
+7 -5
View File
@@ -144,11 +144,13 @@ class Polyline extends TextFeature {
writeGeometryText(geometry, opt_options) {
geometry =
/** @type {LineString} */
(transformGeometryWithOptions(
geometry,
true,
this.adaptOptions(opt_options)
));
(
transformGeometryWithOptions(
geometry,
true,
this.adaptOptions(opt_options)
)
);
const flatCoordinates = geometry.getFlatCoordinates();
const stride = geometry.getStride();
flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
+6 -6
View File
@@ -114,9 +114,9 @@ class TopoJSON extends JSONFeature {
continue;
}
if (topoJSONFeatures[objectName].type === 'GeometryCollection') {
feature = /** @type {TopoJSONGeometryCollection} */ (topoJSONFeatures[
objectName
]);
feature = /** @type {TopoJSONGeometryCollection} */ (
topoJSONFeatures[objectName]
);
features.push.apply(
features,
readFeaturesFromGeometryCollection(
@@ -130,9 +130,9 @@ class TopoJSON extends JSONFeature {
)
);
} else {
feature = /** @type {TopoJSONGeometry} */ (topoJSONFeatures[
objectName
]);
feature = /** @type {TopoJSONGeometry} */ (
topoJSONFeatures[objectName]
);
features.push(
readFeatureFromGeometry(
feature,
+6 -8
View File
@@ -1034,10 +1034,9 @@ function writeQuery(node, featureType, objectStack) {
if (featureNS) {
node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);
}
const item = /** @type {import("../xml.js").NodeStackItem} */ (assign(
{},
context
));
const item = /** @type {import("../xml.js").NodeStackItem} */ (
assign({}, context)
);
item.node = node;
pushSerializeAndPop(
item,
@@ -1348,10 +1347,9 @@ export function writeFilter(filter, opt_version) {
*/
function writeGetFeature(node, featureTypes, objectStack) {
const context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
const item = /** @type {import("../xml.js").NodeStackItem} */ (assign(
{},
context
));
const item = /** @type {import("../xml.js").NodeStackItem} */ (
assign({}, context)
);
item.node = node;
pushSerializeAndPop(
item,
+9 -3
View File
@@ -315,7 +315,9 @@ class WkbReader {
case WKBGeometryType.POLYGON:
case WKBGeometryType.TRIANGLE:
return new Polygon(
/** @type {Array<Array<import('../coordinate.js').Coordinate>>} */ (result),
/** @type {Array<Array<import('../coordinate.js').Coordinate>>} */ (
result
),
this.layout_
);
@@ -327,7 +329,9 @@ class WkbReader {
case WKBGeometryType.MULTI_LINE_STRING:
return new MultiLineString(
/** @type {Array<Array<import('../coordinate.js').Coordinate>>} */ (result),
/** @type {Array<Array<import('../coordinate.js').Coordinate>>} */ (
result
),
this.layout_
);
@@ -335,7 +339,9 @@ class WkbReader {
case WKBGeometryType.POLYHEDRAL_SURFACE:
case WKBGeometryType.TIN:
return new MultiPolygon(
/** @type {Array<Array<Array<import('../coordinate.js').Coordinate>>>} */ (result),
/** @type {Array<Array<Array<import('../coordinate.js').Coordinate>>>} */ (
result
),
this.layout_
);
+3 -1
View File
@@ -652,7 +652,9 @@ class WKT extends TextFeature {
this.splitCollection_ &&
geometry.getType() == GeometryType.GEOMETRY_COLLECTION
) {
geometries = /** @type {GeometryCollection} */ (geometry).getGeometriesArray();
geometries = /** @type {GeometryCollection} */ (
geometry
).getGeometriesArray();
} else {
geometries = [geometry];
}
+3 -3
View File
@@ -422,9 +422,9 @@ function readCapabilityLayer(node, objectStack) {
* @return {Object|undefined} Layer object.
*/
function readLayer(node, objectStack) {
const parentLayerObject = /** @type {!Object<string,*>} */ (objectStack[
objectStack.length - 1
]);
const parentLayerObject = /** @type {!Object<string,*>} */ (
objectStack[objectStack.length - 1]
);
const layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);