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

Attribution shows even when layer not visible #6281

Closed
stevage opened this issue Mar 5, 2018 · 0 comments · Fixed by #7384
Closed

Attribution shows even when layer not visible #6281

stevage opened this issue Mar 5, 2018 · 0 comments · Fixed by #7384

Comments

@stevage
Copy link
Contributor

stevage commented Mar 5, 2018

mapbox-gl-js version: 0.42.2

Steps to Trigger Behavior

  1. Add vector tile sources with attribution.
  2. Add layers that refer to the vector tile sources, with visibility: "none"

Expected Behavior

No attribution displayed.

Actual Behavior

Attribution for every layer displayed.

In this particular app, the user has the option of choosing between different sets of boundary overlays, which we implement by toggling visibility. We want to (and are obliged to) show the source for the selected overlay. But displaying all the sources is confusing, will soon become extremely messy, and obscures the actual relevant information.

I guess the workaround is use addLayer/removeLayer instead of visibility?

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

Successfully merging a pull request may close this issue.

2 participants