Skip to content

Conversation

@jcolot
Copy link

@jcolot jcolot commented Jan 12, 2025

Launch Checklist

For points that are not on the globe, do nothing.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

Attention: Patch coverage is 57.37705% with 52 lines in your changes missing coverage. Please review.

Project coverage is 91.88%. Comparing base (a99fe93) to head (7566b9d).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
...c/geo/projection/vertical_perspective_transform.ts 56.36% 48 Missing ⚠️
...o/projection/vertical_perspective_camera_helper.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5330      +/-   ##
==========================================
- Coverage   91.96%   91.88%   -0.08%     
==========================================
  Files         282      282              
  Lines       39050    39099      +49     
  Branches     6855     6864       +9     
==========================================
+ Hits        35911    35927      +16     
- Misses       3012     3044      +32     
- Partials      127      128       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM HarelM changed the title Drag globe near poles with versor (#5296) Drag globe near poles with versor Jan 14, 2025
get pixelsToClipSpaceMatrix(): mat4 {
return this._helper.pixelsToClipSpaceMatrix;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to avoid these kind of changes as part of this PR, I would recommend moving this to a different PR if this is truly needed.

@kubapelc
Copy link
Contributor

I played around with this for a while, here are some thoughts on the controls:

  • I think it would be very good UX-wise to find a way to make the whole screen usable for panning, not just the part covered by the globe.
  • The map still rolls slightly when panning around Europe at zoom levels around 5 to 7. At this point the map looks pretty flat, maybe it would be more intuitive to transition to fixed-bearing panning at this point?
  • The bearing change from the new controls sometimes clashes with the "snap to north" behaviour MapLibre does (eg. in the case described above). Maybe it should be disabled if fixed bearing panning isn't in use?

It works quite nicely overall!

@NazCodeland
Copy link

Looking forward to this!

@HarelM
Copy link
Collaborator

HarelM commented Jul 2, 2025

@jcolot any updates on this?
Are you planning on moving this PR for review or should I close it?

@jcolot
Copy link
Author

jcolot commented Jul 7, 2025

@HarelM Sorry for this unfinished PR. If it's ok, I will try to work on it this month. From what I remember from when I stopped working on it is that it would maybe be nice to have two options for dragging: The classic one, and the one I introduce with versor calculations. What still needed to be done was fixing the easing, which should not be the same when using versor, and add tests. Happy to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need more info Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Globe panning is reverted when North pole facing the user

4 participants