mapbox-gl-js
mapbox-gl-js copied to clipboard
When toggling to globe view at a high zoom, heatmap sometimes disappears in and out while zooming
mapbox-gl-js version: 2.9.0 +
browser: All
Steps to Trigger Behavior
- Open a map with heatmap and
mercatorprojection - Zoom in past zoom level 5
- Run
map.setProjection('globe') - Zoom in and out and notice heatmap disappearing and reappearing
Expected Behavior
Expect heatmap to not disappear while zooming. Should be same behavior if runnning map.setProjection('globe) at a low zoom level on a map with heatmap (this works as expected).
Actual Behavior
https://user-images.githubusercontent.com/42715836/184214565-99e5cfda-e95d-47cd-bd94-2c54a229f091.MP4
Heatmap disappears while zooming in and out
This might be related to https://github.com/mapbox/mapbox-gl-js/issues/11856
Dropping my thoughts here from Slack: this is NOT limited to the zoom transition (I'm seeing it at levels 4 and 5). It occurs only with specific tiles, so it's probably caused by cache not clearing on projection change.
https://user-images.githubusercontent.com/14878684/184424499-513c5358-746f-40e1-bd9c-4a1bb39b8901.mov
Adding to this, we set certain layer visibility as false, but It appears again at certain zoom level. The behaviour is like this for some other custom layers as well, not only restricted to heat map. Is this a bug in mapbox-gl library?
I also have clusters disappear at certain levels, but only in 'globe' projection. Before they disappear, I also lose ability to detect the features on mouse-over events and for querying with a point.
The cluster layer doesn't render the tiles as it should depending on the pitch and zoom level, in this video, they are 70 degrees and 12, respectively.
https://github.com/mapbox/mapbox-gl-js/assets/71239376/d0d9ba72-8a96-4d64-8800-f929bd4165c3