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

[Draft] Allow underzoom and overpan of a single-copy world #4733

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

larsmaxfield
Copy link
Contributor

Launch Checklist

Draft PR to check the implications of current underzoom design. I am not currently able to run local tests.

Fixes #4510, #4591 by allowing the map to be underzoomed and overpanned:

Explanation of current design at #4510 (comment).

Demo:

https://larsmaxfield.github.io/swings/maplibre-underzoom/unbounded.html
Underzoom demo of unbounded map.

  • 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.

@larsmaxfield larsmaxfield marked this pull request as draft September 21, 2024 11:53
@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2024

Codecov Report

Attention: Patch coverage is 39.80583% with 62 lines in your changes missing coverage. Please review.

Project coverage is 87.75%. Comparing base (ca4e603) to head (c12227c).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/geo/transform.ts 44.44% 30 Missing and 5 partials ⚠️
src/ui/map.ts 32.50% 27 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4733   +/-   ##
=======================================
  Coverage   87.75%   87.75%           
=======================================
  Files         247      247           
  Lines       33656    33747   +91     
  Branches     2201     2167   -34     
=======================================
+ Hits        29536    29616   +80     
- Misses       3132     3148   +16     
+ Partials      988      983    -5     

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

@birkskyum
Copy link
Member

birkskyum commented Sep 21, 2024

I am not currently able to run local tests.

can you elaborate? unit tests? in case you need assistance, what do you see now when you run npm run test-unit?

The Build tests will pass if you update the expected build size to what it is now.

The Tests / Code Hygiene (pull_request), you can have it pass simply by dumping these in the docs/assets/examples folder, and name them so they match the example .html files

underzoom.png
underzoom

underzoom-wide.png
underzoom-wide

underzoom-tall.png
underzoom-tall

@larsmaxfield
Copy link
Contributor Author

larsmaxfield commented Nov 16, 2024

The map visually freezes with overpan=50 when terrain is enabled and the map is panned such that it is in a corner of the bounds. The hash continues to update, though, and you can unfreeze the map by panning away from the corner whereby the map suddenly updates with the hash. Setting overpan=49 solves this. (Finally getting back to this PR and hope to tidy everything up in the coming weeks.)

image

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

Successfully merging this pull request may close these issues.

[Feature] Allow "underzooming" to show entire map on non-square viewports when renderWorldCopies=false
3 participants