-
-
Notifications
You must be signed in to change notification settings - Fork 909
Zoom Adjustment for Drag Panning towards Poles in Globe Terrain (#5839) #5868
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
base: main
Are you sure you want to change the base?
Zoom Adjustment for Drag Panning towards Poles in Globe Terrain (#5839) #5868
Conversation
Does this still work when you are at a high zoom where you can see terrain? Is seems like the code removed was mapping a point on the screen which I am guessing is supposed to account for the terrain when grabbing. |
I'm surprised no test failed. |
@acalcutt @HarelM Thank you to both of you! It's my first attempt at an issue and I wasn't familiar with the panning implementations. I'm not sure if I perfectly understand it, but here's what I thought: My understanding is that terrain mode should drag the map by the pan delta, instead of moving the picked point itself. And in the panning implementations ( Hence for the case when we have mercator projection and terrain mode, we should not call Thanks again! |
Terrain should move the picked point as in heavy terrain the picked point could be a mountain and you want to move it and not by "simple" delta as the case for no terrain (mercator). |
Just curious looking at the changes and because I don't know. When in globe mode, does it switch to mercator projection at some zoom level? probably not right? Seems to me like maybe zoom level could play part in when to change the dragging action, but I think (harel?) may have mentioned before in another PR something like that is a bit hacky. |
The definition of globe is vertical persoective until zoom 11 then gradually switch to mercator when in zoom 12 it's fully mercator. |
I created this test page so I could test the code in this PR which I am comparing to 5.5.0 in It does seem like it at least improves #5839, though i want to do a bit more comparison. |
Hi @HarelM, quick question — in the terrain+drag block, we use |
Yes, I believe this is intentional as I mentioned earlier where you can grab a mountain when terrain is on, which is not the case for non-terrain map. |
Launch Checklist
Fixes: #5839.
Bug: When globe + terrain are enabled and panning toward the arctic circle or Antarctica enlarges the globe. Happens only on terrain, and it does not do this when only globe is enabled. (Related: Zoom Behavior)
Fix: The fix is to change one of the handler functions to use
handleMapControlsPan
used in non-terrain, which adds the appropriate zoom adjustment with respect to the deltas. Before it usessetCenter
directly without factoring zoom adjustment.Note: This does not fix the issue for Key Pan (by up or down arrow keys). The globe is enlarged without zoom adjustment for both terrain and non-terrain when panning towards the poles using arrow keys.
After Fix Visuals:
fix-5839.mov
CHANGELOG.md
under the## main
section.