visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.25k stars 2.08k forks source link

Google 3D Tiles and Masking #8961

Open grahambates-code opened 4 months ago

grahambates-code commented 4 months ago

Description

I have used 3DTileLayer with a Cesium Ion data source in combination with Mask Extension to good effect, but have noticed that the same set up doesn't work if I switch to using a Google 3D Tile set.

See:

https://codesandbox.io/p/sandbox/viewer3d-with-points-forked-73mt5w?file=%2Fsrc%2FViever3D.jsx%3A205%2C15

Flavors

Expected Behavior

Id expect to see 2 circles revealing 2 masked datasets - 1 Cesium,. 1 Google.

Steps to Reproduce

See attached.

Environment

Logs

No response

PawelStadnicki commented 4 months ago

I have encountered the same issue. Entire google maps/tiles are shown, geojson layer does not reflect any view. Not sure if that is related to elevation of 3d tiles somehow

klushinsky commented 1 month ago

Same issue at my end. I was trying to mask 3dTileLayer (from Google 3d tiles) with MaskExtension, but no luck...

felixpalmer commented 3 days ago

@grahambates-code what geometry were you using in the mask layer? I've noticed that it doesn't work with points (ie when ScatterplotLayer is responsible for the rendering), but does work with polygons. Modifying this example like so:

-      operation: 'terrain+draw'
+      operation: 'draw',
+      extensions: [new MaskExtension()],
+      maskId: 'buildings'
     }),
     new GeoJsonLayer({
       id: 'buildings',
+      operation: 'mask',
       data: BUILDING_DATA,
-      extensions: [new DataFilterExtension({filterSize: 1}), new TerrainExtension()],
+      extensions: [new DataFilterExtension({filterSize: 1})],
       stroked: false

works nicely:

https://github.com/user-attachments/assets/9ce02b9e-20ae-4b60-9c30-b61b760361f5

PawelStadnicki commented 1 day ago

@felixpalmer I downloaded the sample code, and provided the exact changes and I can see all tiles, no filtering, no masking, like the feature did not exist

felixpalmer commented 1 hour ago

I tested this directly on the master branch, can you report what version, browser & OS you are using?