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

Added pitch and distance-from-center expressions support #1662

Merged
merged 6 commits into from
Sep 21, 2022

Conversation

jush
Copy link
Member

@jush jush commented Sep 12, 2022

Summary of changes

Added support for pitch and distanceFromCenter in filter expressions for symbol layers.

See counterpart gl-js mapbox/mapbox-gl-js#10795

User impact (optional)

Users can now use pitch {...} and distanceFromCenter {..} expressions in symbol layers.

See following capture where mag x text symbols are hidden when the pitch is higher than 70º.

pitch_distance_layer_filter.mp4

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Optimize code for java consumption (@JvmOverloads, @file:JvmName, etc).
  • Add example if relevant.
  • Document any changes to public APIs.
  • Run make update-api to update generated api files, if there's public API changes, otherwise the verify-api-* CI steps might fail.
  • Update CHANGELOG.md or use the label 'skip changelog', otherwise check changelog CI step will fail.
  • If this PR is a v10.[version] release branch fix / enhancement, merge it to main firstly and then port to v10.[version] release branch.

Fixes: < Link to related issues that will be fixed by this pull request, if they exist >

PRs must be submitted under the terms of our Contributor License Agreement CLA.

@jush jush marked this pull request as ready for review September 14, 2022 09:14
@jush jush requested review from a team as code owners September 14, 2022 09:14
Copy link
Member

@pengdev pengdev left a comment

Choose a reason for hiding this comment

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

LGTM 💎

Copy link
Contributor

@kiryldz kiryldz left a comment

Choose a reason for hiding this comment

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

Example looks 🔥

Copy link
Contributor

@kiryldz kiryldz left a comment

Choose a reason for hiding this comment

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

As a side q - do we need an example for distance-from-center as well?

@jush jush force-pushed the rs-pitch-distance-MAPSAND-413 branch from 9822d81 to f94417a Compare September 19, 2022 13:54
@jush
Copy link
Member Author

jush commented Sep 20, 2022

As a side q - do we need an example for distance-from-center as well?

Done, see https://github.com/mapbox/mapbox-maps-android/pull/1662/files#diff-cad653282a3246159c06f5a0d18545e917c22df45e3d5e93d0d3433bd7456ae0R118

And also updated the screen recording in the PR description.

@jush jush requested a review from kiryldz September 20, 2022 07:09
@jush jush force-pushed the rs-pitch-distance-MAPSAND-413 branch from e21dee4 to 586b8c2 Compare September 21, 2022 07:46
@jush jush force-pushed the rs-pitch-distance-MAPSAND-413 branch from 586b8c2 to 132a2fa Compare September 21, 2022 09:42
@jush jush merged commit 13d17f5 into main Sep 21, 2022
@jush jush deleted the rs-pitch-distance-MAPSAND-413 branch September 21, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants