Skip to content

[Bug] [carto] RasterTileLayer renders in corner of canvas #9387

Open
@donmccurdy

Description

@donmccurdy

Description

Under some configurations I'm seeing the RasterTileLayer render its contents in the lower-left corner of the canvas:

square map canvas, with colored dataviz pixels only in the southwest corner

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

  1. assign canvas width and height to a fixed value (e.g. 512px)
  2. assign RasterTileLayer#tileSize (maybe? it seemed like this mattered in my early tests, maybe not)
  3. 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:

Image

Environment

  • Framework version: deck.gl 9.0.40
  • Browser: Arc, Chromium 132.0.6834.111
  • OS: macOS 15.2

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions