Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 7 tasks
donmccurdy opened this issue Jan 31, 2025 · 0 comments
Open
2 of 7 tasks

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

donmccurdy opened this issue Jan 31, 2025 · 0 comments
Labels

Comments

@donmccurdy
Copy link
Collaborator

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

@donmccurdy donmccurdy added the bug label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant