@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 CHANGED
@@ -15690,26 +15690,29 @@ function urlTemplateToUpdateTrigger(template) {
15690
15690
  }
15691
15691
  /** Render mesh surfaces from height map images. */
15692
15692
  class TerrainLayer extends core.CompositeLayer {
15693
- constructor(props, terrainOptions) {
15694
- super(props);
15695
- console.log('xxx_terrainOptions', terrainOptions);
15696
- this.terrainCogTiles = new CogTiles(terrainOptions);
15697
- }
15693
+ // constructor(props: TerrainLayerProps & ExtraPropsT, terrainOptions: GeoImageOptions) {
15694
+ // super(props);
15695
+ // console.log('xxx_terrainOptions', terrainOptions);
15696
+ // }
15698
15697
  initializeState(context) {
15699
15698
  const _super = Object.create(null, {
15700
15699
  initializeState: { get: () => super.initializeState }
15701
15700
  });
15702
15701
  return __awaiter(this, void 0, void 0, function* () {
15703
15702
  _super.initializeState.call(this, context);
15703
+ console.log('xxx_initializeState_terrain');
15704
+ this.terrainCogTiles = new CogTiles(this.props.terrainOptions);
15704
15705
  this.setState({
15705
15706
  initialized: false,
15706
15707
  });
15708
+ // XXX
15707
15709
  yield this.init(this.terrainUrl);
15708
15710
  });
15709
15711
  }
15710
15712
  init(terrainUrl) {
15711
15713
  return __awaiter(this, void 0, void 0, function* () {
15712
15714
  console.log('xxx_LAYER INITIALIZE STATE');
15715
+ // XXX
15713
15716
  const cog = yield this.terrainCogTiles.initializeCog(this.props.elevationData);
15714
15717
  console.log('xxx_LAYER INITIALIZE STATE', cog);
15715
15718
  // this.tileSize = this.terrainCogTiles.getTileSize(cog);
@@ -15814,6 +15817,7 @@ class TerrainLayer extends core.CompositeLayer {
15814
15817
  const bounds = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
15815
15818
  // const bounds: Bounds = [0, 100, 100, 100];
15816
15819
  // const bounds: Bounds = [tile.bbox.west, tile.bbox.south, tile.bbox.east, tile.bbox.north];
15820
+ // XXX
15817
15821
  const terrain = yield this.terrainCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds);
15818
15822
  console.log('xxx_TILE', terrain, bounds);
15819
15823
  // const terrain = this.loadTerrain({
@@ -15879,6 +15883,7 @@ class TerrainLayer extends core.CompositeLayer {
15879
15883
  return new geoLayers.TileLayer(this.getSubLayerProps({
15880
15884
  id: 'tiles',
15881
15885
  }), {
15886
+ // XXX
15882
15887
  getTileData: this.getTiledTerrainData.bind(this),
15883
15888
  renderSubLayers: this.renderSubLayers.bind(this),
15884
15889
  updateTriggers: {