Skip to content

Conversation

@ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Nov 18, 2025

Summary

  • initialize interleaved map overlays with interleaved default parameters so depth and blending align with expectations

Testing

  • not run (not requested)

Codex Task

@ibgreen ibgreen changed the title Fix interleaved overlay using correct default parameters fix(mapbox-overlay) interleaved overlay using correct default parameters Nov 18, 2025
@coveralls
Copy link

Coverage Status

coverage: 91.144%. remained the same
when pulling 909c043 on codex/update-interleaved-initialization-for-parameters
into f713242 on master.

...this._props,
gl,
parameters: {...getDefaultParameters(map, false), ...this._props.parameters},
parameters: {...getDefaultParameters(map, true), ...this._props.parameters},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixpalmer you added this line in #9803 it does seem that it should be true?

@chrisgervang
Copy link
Collaborator

Which issue is this resolving? I'm trying to reproduce

@ibgreen
Copy link
Collaborator Author

ibgreen commented Nov 20, 2025

Which issue is this resolving? I'm trying to reproduce

https://openjs-foundation.slack.com/archives/C05JCDKHQUE/p1763426667707549

@Spacerat
Copy link

Spacerat commented Nov 21, 2025

See this example: Interleaved mode draws jagged lines, whereas overlay mode seems to have anti-aliasing.

Overlay mode (smooth):

Screenshot 2025-11-21 at 11 16 17 AM

Interleaved mode (jagged):

Screenshot 2025-11-21 at 11 16 22 AM

The issue also appears pretty clearly in the arc example you linked to here - that's the example where I first noticed it. If you switch between overlay & interleaved mode, you can see the anti-aliasing toggle.

@Spacerat
Copy link

Spacerat commented Nov 23, 2025

I attempted to test this fix myself and I found that it didn't seem to change the behavior here.

But I realized here that just setting antialias=true on the MapBox <Map> object fixes this! I suppose DeckGL anti-aliases by default when it manages the canvas, but MapBox doesn't (intentionally).

That's not to say that this change shouldn't land though. It does look like this prop probably was supposed to be set to true? But I I'm not really familiar with the code.

@chrisgervang
Copy link
Collaborator

But I realized here that just setting antialias=true on the MapBox object fixes this! I suppose DeckGL anti-aliases by default when it manages the canvas, but MapBox doesn't (intentionally).

Yes, this is the case (and always has been). So, just to confirm, setting antialias=true solves your issue?

If so, I think we can close this without the change. I'd rather not make a change to this area unless @felixpalmer says otherwise (he recently did an audit of these parameters) or there was a regression.

Feel free to open a doc PR adding a remark about this for interleaved users - deck shouldn't change Mapbox props, so antialiasing will need to be configured by users who want to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants