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

Tilting compass as map tilted #8208

Closed
cs09g opened this issue Apr 29, 2019 · 12 comments · Fixed by #8296
Closed

Tilting compass as map tilted #8208

cs09g opened this issue Apr 29, 2019 · 12 comments · Fixed by #8296

Comments

@cs09g
Copy link
Contributor

cs09g commented Apr 29, 2019

Motivation

When you rotate a map, compass on the navigation control rotates as much as the degree map rotated. but when you tilt the map, the compass doesn't interact for the pitch.

Also, when you click the compass, it makes the map degree to 0 as its default value but pitch would never be back to default even when you click the compass again.

I think when it interacts with both its bearing and pitch, will give better UX.
Implementation would look like(drag mouse on the MAP labeled element, and see compass below. and click the compass):
https://jsfiddle.net/cs09g/5an14p6r/

@mourner
Copy link
Member

mourner commented Apr 30, 2019

That's a cool idea! Want to make a PR with the change?

@cs09g
Copy link
Contributor Author

cs09g commented May 1, 2019

Sure, one more discussion left about compass button clicking. One option is resetting bearing and pitch at once, the other is two-step reset-first click: reset bearing, second click(when bearing is 0): reset pitch. Which option would be better?

first option:
e17187f2-a48b-456c-89ab-adbb36a77e39

second option:
0ae42d0b-c894-4f22-ba81-2778247b1b82

@cs09g
Copy link
Contributor Author

cs09g commented May 8, 2019

@mourner Could you share your idea for the options?

@mourner
Copy link
Member

mourner commented May 8, 2019

I'm not sure, both seem good... @samanpwbb what do you think?

@andrewharvey
Copy link
Collaborator

I think one click to reset both is simpler.

@ryanhamley
Copy link
Contributor

This is basically closed by #8226 The only thing not implemented in that PR is reseting the pitch when the compass button is clicked

@samanpwbb
Copy link
Contributor

samanpwbb commented May 28, 2019

I checked Apple and Google maps for precedent and looks like neither use the compass to control pitch. The compass's sole purpose in both those apps is to communicate the cardinal directions and to allow user to reset direction. Pitching the compass makes directionality less clear.

Therefore, I am actually not sure a pitching compass control is a good idea. At the very least, this should be an optional feature.

If we do implement it, one click to reset would likely match user expectations most closely (double-click interactions like this are rare on the web).

@ryanhamley
Copy link
Contributor

#8226 does implement pitching on the compass control but we could make the functionality optional in an additional PR that implements the on-click pitch reset.

@pakastin
Copy link
Contributor

pakastin commented May 29, 2019

What would you suggest for the name of the pitching setting? controlPitch?

@pakastin
Copy link
Contributor

Hmm.. but it already controls the pitch by default, so wouldn't make much sense 😂

Maybe visualizePitch?

@ryanhamley
Copy link
Contributor

@samanpwbb You're saying that the compass icon shouldn't move at all by default right? That both pitch and bearing visualization should be optional.

@pakastin
Copy link
Contributor

pakastin commented May 29, 2019

Therefore, I am actually not sure a rotating compass control is a good idea. At the very least, this should be an optional feature.

I think he meant:

Therefore, I am actually not sure a rotating pitching compass control is a good idea. At the very least, this should be an optional feature.

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