From 6e796f88c72f991a21ed2e3fc6a6879f81330fdc Mon Sep 17 00:00:00 2001 From: evlist Date: Fri, 20 Jan 2023 18:56:53 +0100 Subject: [PATCH] Cosmetics --- src/lib/ClusterableVectorTileSourceProxy.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } }