Open
Description
Description
Under some configurations I'm seeing the RasterTileLayer render its contents in the lower-left corner of the canvas:
In this screenshot, the black pixels should be over the lake.
Flavors
- Script tag
- React
- Python/Jupyter notebook
- MapboxOverlay
- GoogleMapsOverlay
- CartoLayer
- ArcGIS
Expected Behavior
No response
Steps to Reproduce
https://stackblitz.com/edit/carto-raster-pixelratio
- assign canvas width and height to a fixed value (e.g. 512px)
- assign
RasterTileLayer#tileSize
(maybe? it seemed like this mattered in my early tests, maybe not) - compare with
devicePixelRatio = 1
vs.devicePixelRatio > 1
The problem occurs only for devicePixelRatio > 1 in my testing. An easy way to switch back and forth would be to create a custom 'device' in Chrome dev tools, with a different devicePixelRatio:
Environment
- Framework version: deck.gl 9.0.40
- Browser: Arc, Chromium 132.0.6834.111
- OS: macOS 15.2
Logs
No response