Use the non-webGL google.maps.OverlayView when interleaved is false#9985
Use the non-webGL google.maps.OverlayView when interleaved is false#9985neil-morrison44 wants to merge 2 commits intovisgl:masterfrom
google.maps.OverlayView when interleaved is false#9985Conversation
|
Thanks for looking into this. I traced the behavior back to the original interleaved support work (#5980), and I’m not convinced switching the overlay class addresses the root cause. From what I’m seeing, the issue is driven by DOM stacking order rather than the renderer. Also, per the Vector/Raster note in the docs, moving to Can you focus on a solution that fixes the DOM order/stacking, instead of changing the overlay class? |
|
I don’t think you’re right there - Google maps itself should be solely handling the layering of the overlays. if you’re not doing 3D interleaving The overlay won’t disable tilt / rotate I’ll just be a 2D plane, which is about as good as you can expect.
Can see tilt & rotate still work when using the (I've been working for a Google Maps partner for 11 years now, for most of the time as the lead frontend) |
|
Ah thanks that helps, and I think you’re right to push back on my assumption. I was conflating our Vector/Raster docs with a hard limitation of Given that, I’m good with switching to The one thing I’d still like to sanity-check is the behavior you called out with rotation (the heatmap positioning drifting). If that’s unrelated to the overlay mechanics, then great - but it’s worth confirming so we don't introduce a subtle alignment regression. @felixpalmer, I’d appreciate your input on this proposed fix. |
|
Looks like some tests are failing |
|
@neil-morrison44 thanks for flagging this, clearly an annoying issue.
I'm not sure what you mean by this, could you clarify? I've had a look and it is possible to fix this issue by tweaking how the deck canvas is inserted into the DOM, specifically in if ('getPanes' in overlay) {
overlay.getPanes()?.overlayLayer.appendChild(container);
} else {
// overlay.getMap()?.getDiv().appendChild(container); OLD CODE
const gmContainer = overlay.getMap()?.getDiv();
const gmElement = gmContainer?.getElementsByClassName('gm-style')[0];
gmElement?.appendChild(container);
}This will place it between the google maps canvas and UI. Does this resolve your issue @neil-morrison44? The benefit of this approach is that tilt & rotate work as before |
|
@felixpalmer that solves some issues, though it still appears over some UI like the scroll message Also I'd be wary of how future proof doing DOM manipulation within the google map is As for the fix suggested here, it doesn't cover any UI elements but there is some sort of projection issue at the edges of the screen when tilted (which, for us at least, would be less of a blocker than covering the UI) tilt_issue.mov |
|
@neil-morrison44, thanks for the feedback - indeed relying on the DOM is risky. Your video shows that the tilt parameter is not being passed through to deck.gl - could you try and debug that? In general, I buy your argument that |
|
@neil-morrison44 I've tried many approached to get the projection to work with the |
|
@felixpalmer 👍🏻 looks good, can't see anything in that PR that sticks out at me as being something risky that's liable to be broken in future Google Maps versions. Thanks for having a look into it I'll close this PR off now The original impetus for using With Google Maps deprecating the inbuilt heatmap in May & with their docs recommending deck.gl as the replacement I'd assume there'll be more people going through the same flow I did in the run up to the deprecation. Thanks again |
|
Thanks for the heads-up about Google deprecating their heatmap - I wasn't aware. #9452 is indeed annoying, I had a quick look but couldn't figure it out. If you could do some digging to try and figure out the root cause that would be appreciated |





Background
Using

google.maps.WebGLOverlayViewwheninterleavedis false results in the overlay appearing over all UI likeand
with this in place it uses
google.maps.OverlayViewinstead resulting in it sitting on the right google maps overlay paneChange List
interleavedstatus when judging wether the google maps overlay should treat the map like a vector map or notUsing
interleaved=falseon a vector map is a workaround for this issue: #9452