-
-
Notifications
You must be signed in to change notification settings - Fork 976
Add constrain parameter to ITransform.apply(); constrain when migrating projections #6917
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
Add constrain parameter to ITransform.apply(); constrain when migrating projections #6917
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6917 +/- ##
==========================================
- Coverage 92.47% 92.46% -0.01%
==========================================
Files 288 288
Lines 23849 23849
Branches 5061 5061
==========================================
- Hits 22054 22053 -1
- Misses 1795 1796 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
My approach here is to constrain the incoming transform when we migrate projections, thereby fixing #6892. The |
|
Not sure if the test is in the best spot. And perhaps |
|
Yeah, I'm not sure which is better... |
Always call constrain=true on newTransform.apply()
|
Stripped the |
|
Ping me when you'd like me to review this. |
|
It's ready! 👍 |
|
I've added two minor comment, overall looks good. |
HarelM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, THANKS!
…ng projections (maplibre#6917) * Draft fix maplibre#6892: Add constrain to ITransform.apply * Test map.setProjection() constrains zoom, center * Add CHANGELOG entry * Remove constrain param camera.migrateProjection() Always call constrain=true on newTransform.apply() * Require `constrain` param for `ITransform.apply()` * Add @param tags to `ITransform.apply()`
Changes:
Add
constrainparameter toITransform.apply()and thereforeVerticalPerspectiveTransform.apply()andGlobeTransform.apply(). Was previously an optional parameter forMercatorTransform.apply().Call
constrain=trueinCamera.migrateProjection()Demo:
Launch Checklist
CHANGELOG.mdunder the## mainsection.