@gisatcz/deckgl-geolib 1.11.0-dev.3 → 1.11.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/types/cogbitmaplayer/CogBitmapLayer.d.ts +0 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/cogbitmaplayer/CogBitmapLayer.d.ts +0 -2
- package/package.json +1 -1
- package/src/cogbitmaplayer/CogBitmapLayer.ts +43 -42
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CompositeLayer, CompositeLayerProps, DefaultProps, log, TextureSource, UpdateParameters,
|
|
3
|
+
} from '@deck.gl/core';
|
|
2
4
|
import {
|
|
3
5
|
_Tile2DHeader as Tile2DHeader,
|
|
4
6
|
_TileLoadProps as TileLoadProps,
|
|
@@ -7,15 +9,15 @@ import {
|
|
|
7
9
|
TileLayer,
|
|
8
10
|
TileLayerProps,
|
|
9
11
|
} from '@deck.gl/geo-layers';
|
|
10
|
-
import {BitmapLayer} from '@deck.gl/layers';
|
|
12
|
+
import { BitmapLayer } from '@deck.gl/layers';
|
|
11
13
|
import { _TerrainExtension as TerrainExtension } from '@deck.gl/extensions';
|
|
12
14
|
// import { GL } from '@luma.gl/constants';
|
|
13
15
|
// import GL from '@luma.gl/constants';
|
|
14
16
|
// GL.GL.CLIP_DISTANCE0_WEBGL
|
|
15
|
-
import type {MeshAttributes} from '@loaders.gl/schema';
|
|
17
|
+
import type { MeshAttributes } from '@loaders.gl/schema';
|
|
16
18
|
import CogTiles from '../cogtiles/cogtiles.ts';
|
|
17
19
|
|
|
18
|
-
import {GeoImageOptions} from '../geoimage/geoimage.ts';
|
|
20
|
+
import { GeoImageOptions } from '../geoimage/geoimage.ts';
|
|
19
21
|
// import { TileBoundingBox, ZRange } from '../cogterrainlayer/CogTerrainLayer.js';
|
|
20
22
|
export type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;
|
|
21
23
|
|
|
@@ -246,12 +248,12 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
246
248
|
|
|
247
249
|
// TODO - pass signal to getTile
|
|
248
250
|
// abort request if signal is aborted
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
return await this.state.bitmapCogTiles.getTile(
|
|
252
|
+
tile.index.x,
|
|
253
|
+
tile.index.y,
|
|
254
|
+
tile.index.z,
|
|
255
|
+
// bounds,
|
|
256
|
+
// this.props.meshMaxError,
|
|
255
257
|
);
|
|
256
258
|
}
|
|
257
259
|
|
|
@@ -264,9 +266,9 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
264
266
|
) {
|
|
265
267
|
const SubLayerClass = this.getSubLayerClass('image', BitmapLayer);
|
|
266
268
|
|
|
267
|
-
const { blurredTexture, opacity,clampToTerrain } = this.props;
|
|
269
|
+
const { blurredTexture, opacity, clampToTerrain } = this.props;
|
|
268
270
|
|
|
269
|
-
const
|
|
271
|
+
const { data } = props;
|
|
270
272
|
|
|
271
273
|
if (!data) {
|
|
272
274
|
return null;
|
|
@@ -296,49 +298,48 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
296
298
|
});
|
|
297
299
|
}
|
|
298
300
|
|
|
299
|
-
|
|
300
301
|
renderLayers() {
|
|
301
302
|
const {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
if (this.state.isTiled && this.state.initialized){
|
|
303
|
+
rasterData,
|
|
304
|
+
blurredTexture,
|
|
305
|
+
opacity,
|
|
306
|
+
clampToTerrain,
|
|
307
|
+
tileSize,
|
|
308
|
+
maxRequests,
|
|
309
|
+
onTileLoad,
|
|
310
|
+
onTileUnload,
|
|
311
|
+
onTileError,
|
|
312
|
+
maxCacheSize,
|
|
313
|
+
maxCacheByteSize,
|
|
314
|
+
refinementStrategy,
|
|
315
|
+
} = this.props;
|
|
316
|
+
if (this.state.isTiled && this.state.initialized) {
|
|
316
317
|
return new TileLayer(this.getSubLayerProps({
|
|
317
|
-
|
|
318
|
-
|
|
318
|
+
id: 'tiles',
|
|
319
|
+
}), {
|
|
319
320
|
getTileData: this.getTiledBitmapData.bind(this),
|
|
320
321
|
renderSubLayers: this.renderSubLayers.bind(this),
|
|
321
322
|
updateTriggers: {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
getTileData: {
|
|
324
|
+
rasterData: urlTemplateToUpdateTrigger(rasterData),
|
|
325
|
+
// blurredTexture,
|
|
326
|
+
// opacity,
|
|
327
|
+
clampToTerrain,
|
|
328
|
+
},
|
|
329
|
+
},
|
|
329
330
|
extent: this.state.bitmapCogTiles.cog ? this.state.bitmapCogTiles.getBoundsAsLatLon(this.state.bitmapCogTiles.cog) : null,
|
|
330
331
|
tileSize,
|
|
331
332
|
minZoom: this.minZoom,
|
|
332
333
|
maxZoom: this.maxZoom,
|
|
333
334
|
maxRequests,
|
|
334
335
|
onTileLoad,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
onTileUnload,
|
|
337
|
+
onTileError,
|
|
338
|
+
maxCacheSize,
|
|
339
|
+
maxCacheByteSize,
|
|
340
|
+
refinementStrategy,
|
|
340
341
|
});
|
|
341
342
|
}
|
|
342
343
|
return null;
|
|
343
344
|
}
|
|
344
|
-
}
|
|
345
|
+
}
|