Skip to content

[Bug] Canvas size and positioning misaligned on Google Maps (raster type) with CSS transform #10587

Description

@mstr-pezhang

Description

When the Google Maps container (or an ancestor element) is styled using CSS transform (e.g., transform: scale()), the GoogleMapsOverlay` canvas fails to calculate its dimensions and absolute DOM position correctly. As a result, the deck.gl canvas does not fully align with or cover the Google Map instance, leading to misaligned layers and unrendered/clipped data points.

Flavors

GoogleMapsOverlay

Expected Behavior

  1. The canvas element of deck.gl should fully cover Google Maps (both raster and vector types).
  2. Layers can be correctly rendered with no missing parts.

Steps to Reproduce

  1. Disable GPU acceleration in Chrome settings so that Google Maps falls back to raster type.
  2. Open https://developers.google.com/maps/documentation/javascript/examples/deckgl-tripslayer
  3. Open DevTools and modify <body> with transform: scale(0.5).
  4. See the deck.gl canvas size and positioning are not aligned with Google Maps. Trip lines are no longer visible on some parts.
Image

Environment

  • Framework version: deck.gl 9.2.11 ~ 9.3.6
  • Browser: Chrome 152, Edge 152
  • OS: Windows, MacOS

Logs

No response

Activity

  1. changed the title [-][Bug] Canvas size and positiong misaligned on Google Maps (raster type) with CSS transform[/-] [+][Bug] Canvas size and positioning misaligned on Google Maps (raster type) with CSS transform[/+] on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions