Interleaving DeckGL layers with a base map
See original GitHub issueHello, this is just a continuation #4529. After successfully integrating harp.gl’s map with deck.gl, I was experimenting with things and found my Icon Layer laid on top of the buildings of the map.
Normally in mapbox this could be solved by using the mapboxLayer
and adding the icon layer beneath the building layer but harp.gl doesn’t provide that sort of functionality.
In essence deckgl is just drawing to an overlay canvas which is laid on top of the base canvas (harpgl’s map in this case) if I understood correct. Is there any way to inform the overlay canvas of the depth buffer of the base canvas so everything renders correctly?
An example screen. the red circles show where the icon should be behind the buildings.
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:61
Top Results From Across the Web
Base Maps - deck.gl
Interleaved : Deck renders into the WebGL context of the base map. This allows for occlusion between deck.gl layers and the base map's...
Read more >Interleaving deck.gl with Mapbox Layers | WebGL visualization
WebGL-based visualization examples using deck.gl.
Read more >Using with Google Maps Platform - deck.gl
Deck.gl has interleaved and overlaid support for Google Maps with the @deck.gl/google-maps module. It allows you to construct a Deck instance and apply...
Read more >Using with Mapbox - deck.gl
Using deck.gl layers interleaved with Mapbox layers in the same WebGL context, using either the MapboxOverlay or MapboxLayer from the @deck.gl/mapbox module.
Read more >MapboxOverlay - deck.gl
interleaved (Boolean) - If false , a dedicated deck.gl canvas is added on top of the base map. If true , deck.gl layers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, I’ll try that. And yes I think this was the main issue all along. So depth matching with harp.gl works already, I guess. There might be issues with far plane mismatching which give those yellowish/blue planes but more or less they can be avoided or tweaked.
I’ll open a new thread regarding icon rendering when I’m back on this. Thanks for the continued support, appreciate it.
I tried your snippet and it’s working on my end. Not getting any error or rendering issue. Tried logging the far value both on the deckgl side and inside
MapView.js
and it prints the same value too.The only problem remaining is the original one, icons being blocked by buildings when they should be in front. There is also a whitish plane coming from the top at certaing angles, maybe another near/far plane mismanagment between the 2 apis I guess.