visgl / deck.gl

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

[Bug] Deck.gl Incompatible With Google Maps Data-Driven Styling #8245

Closed Derek-Herr77 closed 1 year ago

Derek-Herr77 commented 1 year ago

Description

When Data-Driven Styling is turned on for a google map ID, deck.gl renders underneath the google maps, rendering all deck.gl layers invisible, the visibility varies based on which feature layers are turned on for a map ID, e.g. turning both administrative layers 1 & 2 on renders all of deck.gl invisible.

This only happens in Google Maps API versions 3.54 and above. Version 3.53 and below seem to work. A quick fix for this issue is to turn interleaved off when loading the google map overlay like so: const overlay = new GoogleMapsOverlay({ interleaved: false, layers: [layer] }

This solution however reduces image quality and renders the deck.gl layers overtop labels, making it an incomplete fix.

Flavors

Expected Behavior

Deck.gl to render correctly with Data-Driven Styling turned on for a Google Map ID.

Steps to Reproduce

This can be seen in the following jsfiddle in Googles documentation: https://developers.google.com/maps/documentation/javascript/examples/deckgl-arclayer

Environment

-deck.gl@8.9.0 -Google Maps Version 3.54 and above

Logs

No response

Derek-Herr77 commented 1 year ago

It seems that once data driven styling is turned on for a style, that mapstyle will no longer work even if turned off again, a new map style has to be created to return functionality.

jeantimex commented 1 year ago

Hi, Maps JS pushed a new release yesterday which includes a fix in rendering WebglOverlayView, this issue should be fixed now, could you help verify? Thank you!

felixpalmer commented 1 year ago

@Derek-Herr77 could you confirm if it is fixed for you? The demo is working well for me. Thank you for the quick fix @jeantimex !

Derek-Herr77 commented 1 year ago

@Derek-Herr77 could you confirm if it is fixed for you? The demo is working well for me. Thank you for the quick fix @jeantimex !

I can confirm that this fix is working on my end as well. Thanks for the fix @jeantimex!

Derek-Herr77 commented 1 year ago

Fixed with new Maps JS release.

jeantimex commented 1 year ago

Thank you so much for helping us verify!