diff --git a/src/lib/ClusterableVectorTileSourceProxy.ts b/src/lib/ClusterableVectorTileSourceProxy.ts index b82fb5e..52247a7 100644 --- a/src/lib/ClusterableVectorTileSourceProxy.ts +++ b/src/lib/ClusterableVectorTileSourceProxy.ts @@ -19,10 +19,11 @@ class ClusterableVectorTileSourceProxy { this.resolution = resolution; if (this.extent === undefined || !equals(this.extent, extent)) { this.extent = extent; - if (target.getProjection() != null) { + const projection = target.getProjection(); + if (projection != null) { this.extentProjected = fromLonLat( extent.slice(0, 2), - target.getProjection() + projection ).concat(fromLonLat(extent.slice(2), this.projection)); } } @@ -48,7 +49,6 @@ class ClusterableVectorTileSourceProxy { this.extentProjected !== undefined ? target.getFeaturesInExtent(this.extentProjected) : []; - //console.trace(); this.featuresSent = true; // console.log({ // caller: 'clusterableVectorTileSourceProxy', @@ -80,6 +80,7 @@ class ClusterableVectorTileSourceProxy { constructor(options: Options) { const { source } = options; + // @ts-ignore this.proxy = new Proxy(source, { get: (target, prop, receiver) => { let result; @@ -99,6 +100,7 @@ class ClusterableVectorTileSourceProxy { return result; }, }); + //@ts-ignore return this.proxy; } }