@deck.gl/geo-layers 9.0.7 → 9.0.9

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "deck.gl layers supporting geospatial use cases and GIS formats",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "9.0.7",
6
+ "version": "9.0.9",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -46,8 +46,8 @@
46
46
  "@loaders.gl/terrain": "^4.2.0",
47
47
  "@loaders.gl/tiles": "^4.2.0",
48
48
  "@loaders.gl/wms": "^4.2.0",
49
- "@luma.gl/gltf": "^9.0.9",
50
- "@luma.gl/shadertools": "^9.0.9",
49
+ "@luma.gl/gltf": "^9.0.11",
50
+ "@luma.gl/shadertools": "^9.0.11",
51
51
  "@math.gl/core": "^4.0.0",
52
52
  "@math.gl/culling": "^4.0.0",
53
53
  "@math.gl/web-mercator": "^4.0.0",
@@ -64,5 +64,5 @@
64
64
  "@luma.gl/core": "^9.0.0",
65
65
  "@luma.gl/engine": "^9.0.0"
66
66
  },
67
- "gitHead": "4cc921a720e00df45bce7e76a8d3104392aaf92f"
67
+ "gitHead": "ac5827ddda19cb79f80a599e6f5302e9075f9f6f"
68
68
  }
@@ -154,6 +154,8 @@ export type TileLayerPickingInfo<
154
154
  tile?: Tile2DHeader<DataT>;
155
155
  /** the tile that emitted the picking event */
156
156
  sourceTile: Tile2DHeader<DataT>;
157
+ /** a layer created by props.renderSubLayer() that emitted the picking event */
158
+ sourceTileSubLayer: Layer;
157
159
  };
158
160
 
159
161
  /**
@@ -341,22 +343,20 @@ export default class TileLayer<DataT = any, ExtraPropsT extends {} = {}> extends
341
343
  }
342
344
 
343
345
  getPickingInfo(params: GetPickingInfoParams): TileLayerPickingInfo<DataT> {
344
- const sourceTile: Tile2DHeader<DataT> = (params.sourceLayer as any).props.tile;
346
+ // TileLayer does not directly render anything, sourceLayer cannot be null
347
+ const sourceLayer = params.sourceLayer!;
348
+ const sourceTile: Tile2DHeader<DataT> = (sourceLayer.props as any).tile;
345
349
  const info = params.info as TileLayerPickingInfo<DataT>;
346
350
  if (info.picked) {
347
351
  info.tile = sourceTile;
348
352
  }
349
353
  info.sourceTile = sourceTile;
354
+ info.sourceTileSubLayer = sourceLayer;
350
355
  return info;
351
356
  }
352
357
 
353
- protected _updateAutoHighlight(info: PickingInfo): void {
354
- const sourceTile = (info as any).sourceTile as Tile2DHeader;
355
- if (sourceTile && sourceTile.layers) {
356
- for (const layer of sourceTile.layers) {
357
- layer.updateAutoHighlight(info);
358
- }
359
- }
358
+ protected _updateAutoHighlight(info: TileLayerPickingInfo<DataT>): void {
359
+ info.sourceTileSubLayer.updateAutoHighlight(info);
360
360
  }
361
361
 
362
362
  renderLayers(): Layer | null | LayersList {