@gisatcz/deckgl-geolib 1.12.0-dev.2 → 1.12.0-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.
@@ -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: (boolean | GeoImageOptions | ClampToTerrainOptions)[];
71
69
  };
72
70
  extent: any;
73
71
  tileSize: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisatcz/deckgl-geolib",
3
- "version": "1.12.0-dev.2",
3
+ "version": "1.12.0-dev.3",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -211,6 +211,15 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
211
211
  // const terrain = this.loadTerrain(props as TerrainLoadProps);
212
212
  // this.setState({ terrain });
213
213
  }
214
+
215
+ // Update the useChannel option for bitmapCogTiles when cogBitmapOptions.useChannel changes.
216
+ // This ensures that the correct channel is used for rendering, but directly modifying the state
217
+ // object in this way is not ideal and may need refactoring in the future to follow a more
218
+ // declarative state management approach. Consider revisiting this if additional properties
219
+ // need to be synchronized or if the state structure changes.
220
+ if (props?.cogBitmapOptions?.useChannel && (props.cogBitmapOptions?.useChannel !== oldProps.cogBitmapOptions?.useChannel)) {
221
+ this.state.bitmapCogTiles.options.useChannel = props.cogBitmapOptions.useChannel;
222
+ }
214
223
 
215
224
  // TODO - remove in v9
216
225
  // @ts-ignore
@@ -239,6 +248,7 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
239
248
  tile: Tile2DHeader<TextureSource>;
240
249
  },
241
250
  ) {
251
+
242
252
  const SubLayerClass = this.getSubLayerClass('image', BitmapLayer);
243
253
  const { blurredTexture } = this.state.bitmapCogTiles.options;
244
254
 
@@ -299,13 +309,15 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
299
309
  getTileData: this.getTiledBitmapData.bind(this),
300
310
  renderSubLayers: this.renderSubLayers.bind(this),
301
311
  updateTriggers: {
302
- getTileData: {
312
+ getTileData: [
303
313
  // rasterData: urlTemplateToUpdateTrigger(rasterData),
304
314
  // blurredTexture,
305
315
  // opacity,
306
316
  // cogBitmapOptions,
307
317
  clampToTerrain,
308
- },
318
+ cogBitmapOptions,
319
+ ],
320
+ // renderSubLayers: [cogBitmapOptions],
309
321
  },
310
322
  extent: this.state.bitmapCogTiles.getBoundsAsLatLon(),
311
323
  tileSize,