Skip to content

[Bug] IconLayer renders high-quality SVGs as blurry even at native resolution #9890

@adarsh1701198

Description

@adarsh1701198

Description

Hi team,
I’m noticing an issue where SVG icons rendered inside IconLayer appear blurry, even though the original SVG assets are high-resolution and look perfectly sharp when used elsewhere (ex: Google Maps Advanced Marker).

I’m using deck.gl in a WebGL context, and I’ve verified that:

  • The original SVGs are crisp and scalable.
  • The blur persists even at high pixelRatio displays (e.g., Retina).
  • The same icons look sharp when rendered using other map libraries/components.
  • No resizing or scaling is being done on the SVGs before passing them into IconLayer.

Because of this, markers on the map appear noticeably soft compared to surrounding UI elements.

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CARTO
  • ArcGIS

Expected Behavior

SVG icons should render crisp/sharp at all zoom levels and resolutions when used in IconLayer, similar to how they appear in other map frameworks.

Steps to Reproduce

new IconLayer({ id: "mbp-layer", data: mbp, getPosition: (d: any) => [d.longitude, d.latitude], getIcon: (d: any) => ({ url: d.icon, width: 100, height: 100, anchorY: 100 }), sizeUnits: "pixels", getSize: 27.17, pickable: true, pickingRadius: 10, // Increase picking radius to make markers easier to click onHover: (info: any) => { const { object, pixel } = info; if(object) onHoverPoi && !focusedItem.type && !isGeoFocused && onHoverPoi("mbp", object ?? null, pixel); else onHoverPoi && !isGeoFocused && onHoverPoi("mbp", null); }, onClick: (info: any) => { const { object, pixel } = info; console.log('MBP Layer onClick:', object, 'focusedItem:', focusedItem, 'isGeoFocused:', isGeoFocused); // Allow clicks even when there's a focused item, to enable switching between markers handleClick && object && handleClick("mbp", object ?? null, pixel); }, });

Environment

  • Framework version:
    "@deck.gl/core": "^8.9.27",
    "@deck.gl/google-maps": "^8.9.27",
    "@deck.gl/layers": "^8.9.27",
    "@deck.gl/react": "^8.9.27",

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