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

cherry-pick #12201: Marker terrain occluded opacity #12258

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

karimnaaji
Copy link
Contributor

@karimnaaji karimnaaji commented Sep 26, 2022

Cherry-pick PR #12201 from @jacadzaca for minor review fixes and CI: including renaming of public API + unit tests.

Fixes #12123

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Allow to override marker opacity when occluded by terrain (h/t [jacadzaca](https://github.com/jacadzaca))</changelog>

Copy link
Contributor

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

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

This looks good to me 👍

@jacadzaca
Copy link
Contributor

jacadzaca commented Sep 26, 2022

Merging this solves #12123, but the issue's not linked.

@karimnaaji karimnaaji merged commit 1244cac into main Sep 26, 2022
@karimnaaji karimnaaji deleted the karim/terrain-occluded-opacity branch September 26, 2022 13:36
@slavanga
Copy link

@karimnaaji This is a great feature.
Is there any documentation on this? How would this be set for markers add via addLayer?

@karimnaaji
Copy link
Contributor Author

karimnaaji commented Nov 29, 2022

This only affects markers set via marker.addTo. I think what you might be referring to are symbols? In that case there's no current way to adjust the opacity of occluded symbols. If that's something that might be useful to you, could you please open a feature request with the described use case?

Otherwise the documentation for this feature is here: https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker#setoccludedopacity and https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker-parameters.

@slavanga
Copy link

Thanks for your swift reply.
Yes, I was referring to markers added as symbols and will open a feature request.

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

Successfully merging this pull request may close these issues.

Markers are visible when behind terrain
4 participants