visgl / visgl/deck.gl

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

Open
#9,890 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in a React IconLayer using the configuration and SVG behavior described here. Inspect the IconLayer rendering and icon texture path to determine where sharp SVG content becomes blurry, then verify the result across native and high-pixel-ratio displays. Done means the same SVG markers render crisply without caller-side resizing or scaling.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
computer-graphics, data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.