From ddae414ddc7d7e5a249d17bac4ef6854c30607fd Mon Sep 17 00:00:00 2001 From: Kevin Schmidt Date: Wed, 3 Oct 2018 10:41:52 -0600 Subject: [PATCH] Fix type check errors in ol/format/MVT --- src/ol/format/MVT.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index f5f167e15a..6977299acf 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -209,11 +209,13 @@ class MVT extends FeatureFormat { geometryType === GeometryType.MULTI_LINE_STRING ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends) : null; } - feature = new this.featureClass_(); + const ctor = /** @type {typeof import("../Feature.js").default} */ (this.featureClass_); + feature = new ctor(); if (this.geometryName_) { feature.setGeometryName(this.geometryName_); } - const geometry = transformWithOptions(geom, false, this.adaptOptions(opt_options)); + const geometry = /** @type {import("../geom/Geometry.js").default} */ (transformWithOptions(geom, false, + this.adaptOptions(opt_options))); feature.setGeometry(geometry); feature.setId(id); feature.setProperties(values);