-
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 touch support for NavigationControl's compass button + add pitch indication to icon #8226
Conversation
Tapping broke, will fix that now |
Tapping bug now fixed, so everything is working as expected! |
Linting issues now fixed! |
Pitch NavigationControl button icon when changing pitch
Bonus feature: compass icon now pitches when pitch is changed |
Both features running smoothly: https://aviamaps.com/map 😎 |
Works nicely! Do you think clicking to reset should also reset the pitch? |
I was thinking about that but not sure.. Because for example when you're in a "navigation mode", it would make sense to only reset rotation 🤔 |
I'm leaning towards it should reset pitch as well. If this change is accepted, then I think we should update the API docs at https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol to make it clear that the compass controls both bearing and pitch. |
The second feature is also discussing on #8208. I think one PR should be covered one feature. |
that was the plan, but accidentally came into this PR.. 😕 |
How could you skip the issue already registered. I'd like you to divide this PR for each feature. |
@pakastin I think it's okay for both these features to be done in this single PR given they are related, and the touch support is fairly minor. I don't think it's worth the overhead of effort separating them, unless you want to, or unless the maintainers ask... |
Ok, perfect! They're both basically patches IMO.. |
_pitch –> pitch
Any news on merging this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
Good, I can update to v1.0.0 then 😎 |
Related to #3405
NavigationControl's compass button was missing touch drag support. Added that.
You can try the functionality here: https://aviamaps.com/map