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

NavigationControl - Compass icon is not rotating anymore #8579

Closed
pathmapper opened this issue Jul 30, 2019 · 4 comments
Closed

NavigationControl - Compass icon is not rotating anymore #8579

pathmapper opened this issue Jul 30, 2019 · 4 comments
Assignees
Labels
Milestone

Comments

@pathmapper
Copy link
Contributor

mapbox-gl-js version: v1.2.0

browser: Chrome/Firefox

Steps to Trigger Behavior

  1. Map with map navigation controls
    map.addControl(new mapboxgl.NavigationControl());

  2. Rotate the map

Link to Demonstration

https://docs.mapbox.com/mapbox-gl-js/example/navigation/

Expected Behavior

The compass is rotating.

Actual Behavior

There is only a very tiny shaking of the compass icon when the map is rotated.

Note:
If the visualizePitch option introduced in #8296 is used, the compass is rotating as expected: https://jsbin.com/xuwiguniti/1/edit?html,output

@peterqliu
Copy link
Contributor

might be related to #8296

@peterqliu
Copy link
Contributor

culprit lies in this line, not being properly degree-ified from radians:

`rotate(${this._map.transform.angle}deg)`;

@peterqliu
Copy link
Contributor

Separately, compass at max pitch looks tiny and not easily readable. Gonna try to size it up subtly based on pitch

Screen Shot 2019-08-06 at 12 26 07 PM

@peterqliu
Copy link
Contributor

🚢 #8605

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

No branches or pull requests

4 participants