Cosmetics

This commit is contained in:
Eric van der Vlist 2023-01-20 18:56:53 +01:00
parent 982cb722f7
commit 6e796f88c7
1 changed files with 5 additions and 3 deletions

View File

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