@gisatcz/deckgl-geolib 1.10.2-dev.2 → 1.10.2-dev.3
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 +10 -5
- 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/cogterrainlayer/CogTerrainLayer.d.ts +0 -2
- package/dist/esm/index.js +10 -5
- 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/cogterrainlayer/CogTerrainLayer.d.ts +0 -2
- package/package.json +1 -1
- package/src/cogterrainlayer/CogTerrainLayer.ts +11 -7
|
@@ -2,7 +2,6 @@ import { Color, CompositeLayer, CompositeLayerProps, DefaultProps, Layer, Layers
|
|
|
2
2
|
import { SimpleMeshLayer } from '@deck.gl/mesh-layers';
|
|
3
3
|
import type { MeshAttributes } from '@loaders.gl/schema';
|
|
4
4
|
import { TileLayerProps, GeoBoundingBox, _TileLoadProps as TileLoadProps, _Tile2DHeader as Tile2DHeader, NonGeoBoundingBox } from '@deck.gl/geo-layers';
|
|
5
|
-
import { GeoImageOptions } from '../geoimage/geoimage.ts';
|
|
6
5
|
import CogTiles from '../cogtiles/cogtiles.ts';
|
|
7
6
|
export type Bounds = [minX: number, minY: number, maxX: number, maxY: number];
|
|
8
7
|
export type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;
|
|
@@ -66,7 +65,6 @@ export default class TerrainLayer<ExtraPropsT extends {} = {}> extends Composite
|
|
|
66
65
|
terrain?: MeshAttributes;
|
|
67
66
|
zRange?: ZRange | null;
|
|
68
67
|
};
|
|
69
|
-
constructor(props: TerrainLayerProps & ExtraPropsT, terrainOptions: GeoImageOptions);
|
|
70
68
|
initializeState(context: any): Promise<void>;
|
|
71
69
|
init(terrainUrl: string): Promise<void>;
|
|
72
70
|
updateState({ props, oldProps }: UpdateParameters<this>): void;
|
package/dist/esm/index.js
CHANGED
|
@@ -15688,26 +15688,29 @@ function urlTemplateToUpdateTrigger(template) {
|
|
|
15688
15688
|
}
|
|
15689
15689
|
/** Render mesh surfaces from height map images. */
|
|
15690
15690
|
class TerrainLayer extends CompositeLayer {
|
|
15691
|
-
constructor(props, terrainOptions) {
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15695
|
-
}
|
|
15691
|
+
// constructor(props: TerrainLayerProps & ExtraPropsT, terrainOptions: GeoImageOptions) {
|
|
15692
|
+
// super(props);
|
|
15693
|
+
// console.log('xxx_terrainOptions', terrainOptions);
|
|
15694
|
+
// }
|
|
15696
15695
|
initializeState(context) {
|
|
15697
15696
|
const _super = Object.create(null, {
|
|
15698
15697
|
initializeState: { get: () => super.initializeState }
|
|
15699
15698
|
});
|
|
15700
15699
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15701
15700
|
_super.initializeState.call(this, context);
|
|
15701
|
+
console.log('xxx_initializeState_terrain');
|
|
15702
|
+
this.terrainCogTiles = new CogTiles(this.props.terrainOptions);
|
|
15702
15703
|
this.setState({
|
|
15703
15704
|
initialized: false,
|
|
15704
15705
|
});
|
|
15706
|
+
// XXX
|
|
15705
15707
|
yield this.init(this.terrainUrl);
|
|
15706
15708
|
});
|
|
15707
15709
|
}
|
|
15708
15710
|
init(terrainUrl) {
|
|
15709
15711
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15710
15712
|
console.log('xxx_LAYER INITIALIZE STATE');
|
|
15713
|
+
// XXX
|
|
15711
15714
|
const cog = yield this.terrainCogTiles.initializeCog(this.props.elevationData);
|
|
15712
15715
|
console.log('xxx_LAYER INITIALIZE STATE', cog);
|
|
15713
15716
|
// this.tileSize = this.terrainCogTiles.getTileSize(cog);
|
|
@@ -15812,6 +15815,7 @@ class TerrainLayer extends CompositeLayer {
|
|
|
15812
15815
|
const bounds = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
|
|
15813
15816
|
// const bounds: Bounds = [0, 100, 100, 100];
|
|
15814
15817
|
// const bounds: Bounds = [tile.bbox.west, tile.bbox.south, tile.bbox.east, tile.bbox.north];
|
|
15818
|
+
// XXX
|
|
15815
15819
|
const terrain = yield this.terrainCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds);
|
|
15816
15820
|
console.log('xxx_TILE', terrain, bounds);
|
|
15817
15821
|
// const terrain = this.loadTerrain({
|
|
@@ -15877,6 +15881,7 @@ class TerrainLayer extends CompositeLayer {
|
|
|
15877
15881
|
return new TileLayer(this.getSubLayerProps({
|
|
15878
15882
|
id: 'tiles',
|
|
15879
15883
|
}), {
|
|
15884
|
+
// XXX
|
|
15880
15885
|
getTileData: this.getTiledTerrainData.bind(this),
|
|
15881
15886
|
renderSubLayers: this.renderSubLayers.bind(this),
|
|
15882
15887
|
updateTriggers: {
|