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

How to enable antialiasing for deck.gl custom layers? #2809

Closed
jasonsoden opened this issue Mar 16, 2019 · 5 comments
Closed

How to enable antialiasing for deck.gl custom layers? #2809

jasonsoden opened this issue Mar 16, 2019 · 5 comments
Assignees
Labels

Comments

@jasonsoden
Copy link

jasonsoden commented Mar 16, 2019

In February, mapbox-gl-js added support for the antialias flag but I'm not sure how to use it.

image

image

Any suggestions? I'm experiencing jagged edges everywhere I've tested the custom layer.

  • Windows 10 (4k tv, 1440p monitor, Surface Book)
  • iOS (iPad 12.9" Pro, iPhone 6 Plus)
  • Android (OnePlus 3)
  • Chrome, Firefox, Edge, Opera, Safari

The issue is less extreme with Retina Display but still happens. I'm using @deck.gl/react 6.4.7.

@jasonsoden jasonsoden changed the title How to enable antialiasing? How to enable antialiasing for custom layers? Mar 16, 2019
@jasonsoden jasonsoden changed the title How to enable antialiasing for custom layers? How to enable antialiasing for deck.gl custom layers? Mar 16, 2019
@Pessimistress
Copy link
Collaborator

The antialias flag was not applied to custom layers, as fixed by mapbox/mapbox-gl-js#7821. This commit has not been released by mapbox. We are actively tracking its progress.

@sibbl
Copy link

sibbl commented Jun 3, 2019

The PR from mapbox's side is closed now and the fix was released with mapbox a few months back already. However, I still run into this issue using the latest version of all involved npm modules.

@Pessimistress
Copy link
Collaborator

Pessimistress commented Jun 3, 2019

@sibbl The antialias option is default to false on Mapbox's side. You must manually enable it by supplying antialias: true to the mapboxgl.Map constructor, or mapOptions: {antialias: true} to the MapGL component if using React.

@sibbl
Copy link

sibbl commented Jun 3, 2019

@Pessimistress that's exactly what I did, but it didn't change anything. Is there a reason why mapbox-gl@0.54.0 is skipped by react-map-gl as the fix mentioned above is only in this and newer versions? Manually installing this specific version also didn't help unfortunately.

@Pessimistress
Copy link
Collaborator

@sibbl you can try react-map-gl 5.0.0 which uses mapbox-gl 1.0.0. I will also publish a patch of react-map-gl if you want to stay on the 0.xx track.

@tgorkin tgorkin closed this as completed Sep 19, 2019
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

4 participants