-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add "pitch" and "rotation" values to be available to expressions similar to how "zoom" is available. #6759
Comments
Pitch is a global parameter so you can create two separate layers sharing a data source, one for 2D and one for 3D and then setup different styles. Then you can toggle visibility between 2D and 3D layer in 'pitchend' event. It would be hard to try to use a single layer to represent two perspectives. It is not just different syntax for fill or extrusion styles but different approaches to handle events like hovering and highlighting. |
Adding a ['pitch'] and ['bearing'] accessor would have multiple applications, specially in animations. The most straightforward I can think about now is to use it in an interpolate exporession for the |
Since this issue seems focused on that and doesn't mention any example use cases for |
Motivation
Currently there is no way to change the styling depending on what the pitch is. For example if the pitch is close to zero, we would like to hide the 3D effects or replace them with 2D effects.
Additionally, using the pitch and rotation values would likely allow to workaround #3993
Design
Add the expressions:
The text was updated successfully, but these errors were encountered: