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

Small rotation of the map does not remain #396

Open
jbkoh opened this issue Jul 17, 2021 · 2 comments
Open

Small rotation of the map does not remain #396

jbkoh opened this issue Jul 17, 2021 · 2 comments

Comments

@jbkoh
Copy link

jbkoh commented Jul 17, 2021

Hello there, thanks for the great project! I know this repo is not actively maintained, but if anybody can give me any guidance, I'd be happy to contribute my time for fixing the bug.

My issue is: when I try to rotate the map for around 5 degree or less, the rotation does not remain and goes back to the original state.

Thanks!

@jbkoh jbkoh changed the title small rotation of the map does not remain Small rotation of the map does not remain Jul 17, 2021
@Mkellyeng
Copy link
Contributor

Taking a quick look, the rotation is handled in one of two different areas, depending on whether you use the map overlay or not. The rotation issue occurs with the map overlay, when you use your mouse to rotate the screen, right?

I believe that's handled in Map.vue (...\src\components\Canvas\Map.vue), though I'm not super familiar with it

Looking over it, I can see it doing some math with the map rotation. I'd guess that it's related to how the map adjusts it's resolution, or some precision issue in how it calculates the rotation. Can't quite tell though

I'd probably start with this
this.rotation = this.view.getRotation();

@jbkoh
Copy link
Author

jbkoh commented Jul 19, 2021

Thanks for sharing the pointer! I will take a look (or let my colleague do it). Based on the behavior, I'm guessing it's snapping to the right north when the degree is close to that.

Kazam_screencast_00000.mov

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

No branches or pull requests

2 participants