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] Text in dynamically generated SVG/PNG is blurry in IconLayer #9288

Open
1 of 7 tasks
travstw opened this issue Dec 9, 2024 · 0 comments
Open
1 of 7 tasks

[Bug] Text in dynamically generated SVG/PNG is blurry in IconLayer #9288

travstw opened this issue Dec 9, 2024 · 0 comments
Labels

Comments

@travstw
Copy link

travstw commented Dec 9, 2024

Description

When creating icons that need dynamically generated text, the text appears blurry when rendered on the map. I've tried both using SVGs and generating PNGs using canvas and both have the same result. I've made sure that the generated icon is the specified size so there should not be any scaling involved.

Below is a screenshot from the application... left icon is just a regular canvas element (not connected to the map) and the right is an IconLayer icon generated with the same canvas (and draw function) and passed to deck as an dataURL.

TextLayer does not help because we have other icons with the same problem that are not plain rectangles, and the backgrounds don't occlude properly so you get garbled text everywhere they overlap.

Screenshot 2024-12-09 at 13 07 31

Am I just missing something dumb somewhere?

Flavors

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

Expected Behavior

I expect the rendered icon to match the generated image/svg pixel for pixel.

Steps to Reproduce

https://codepen.io/travstw/pen/MYgepWb?editors=1010

Environment

Logs

No response

@travstw travstw added the bug label Dec 9, 2024
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