@gisatcz/deckgl-geolib 1.12.0-dev.2 → 1.12.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.
@@ -65,9 +65,7 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
65
65
  getTileData: any;
66
66
  renderSubLayers: any;
67
67
  updateTriggers: {
68
- getTileData: {
69
- clampToTerrain: boolean | ClampToTerrainOptions;
70
- };
68
+ getTileData: (number | boolean | ClampToTerrainOptions)[];
71
69
  };
72
70
  extent: any;
73
71
  tileSize: any;
package/dist/esm/index.js CHANGED
@@ -5881,6 +5881,7 @@ class CogBitmapLayer extends CompositeLayer {
5881
5881
  });
5882
5882
  }
5883
5883
  updateState({ props, oldProps }) {
5884
+ var _a, _b, _c;
5884
5885
  const rasterDataChanged = props.rasterData !== oldProps.rasterData;
5885
5886
  if (rasterDataChanged) {
5886
5887
  const { rasterData } = props;
@@ -5895,6 +5896,14 @@ class CogBitmapLayer extends CompositeLayer {
5895
5896
  // || props.elevationDecoder !== oldProps.elevationDecoder
5896
5897
  || props.bounds !== oldProps.bounds;
5897
5898
  if (!this.state.isTiled && shouldReload) ;
5899
+ // Update the useChannel option for bitmapCogTiles when cogBitmapOptions.useChannel changes.
5900
+ // This ensures that the correct channel is used for rendering, but directly modifying the state
5901
+ // object in this way is not ideal and may need refactoring in the future to follow a more
5902
+ // declarative state management approach. Consider revisiting this if additional properties
5903
+ // need to be synchronized or if the state structure changes.
5904
+ if (((_a = props === null || props === void 0 ? void 0 : props.cogBitmapOptions) === null || _a === void 0 ? void 0 : _a.useChannel) && (((_b = props.cogBitmapOptions) === null || _b === void 0 ? void 0 : _b.useChannel) !== ((_c = oldProps.cogBitmapOptions) === null || _c === void 0 ? void 0 : _c.useChannel))) {
5905
+ this.state.bitmapCogTiles.options.useChannel = props.cogBitmapOptions.useChannel;
5906
+ }
5898
5907
  // TODO - remove in v9
5899
5908
  // @ts-ignore
5900
5909
  if (props.workerUrl) {
@@ -5939,13 +5948,15 @@ class CogBitmapLayer extends CompositeLayer {
5939
5948
  getTileData: this.getTiledBitmapData.bind(this),
5940
5949
  renderSubLayers: this.renderSubLayers.bind(this),
5941
5950
  updateTriggers: {
5942
- getTileData: {
5951
+ getTileData: [
5943
5952
  // rasterData: urlTemplateToUpdateTrigger(rasterData),
5944
5953
  // blurredTexture,
5945
5954
  // opacity,
5946
5955
  // cogBitmapOptions,
5947
5956
  clampToTerrain,
5948
- },
5957
+ cogBitmapOptions.useChannel,
5958
+ ],
5959
+ // renderSubLayers: [cogBitmapOptions],
5949
5960
  },
5950
5961
  extent: this.state.bitmapCogTiles.getBoundsAsLatLon(),
5951
5962
  tileSize,