This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Conversation
Contributor
|
Tried this out on iOS and did not notice any issues. |
If for whatever reason a source doesn’t cover all the zoom levels allowed by the style – for instance, if different sources have different zoom ranges – use the nearest available zoom level.
Even if the map supports wrapping the world, it isn’t necessary to show more than one full revolution of the world at a time. Removed a redundant zoom level clamp.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I started out trying to fix the OS X SDK’s Zoom Out button, which refused to disable even as you reach the effective minimum zoom level. I wound up fixing a few related issues:
TransformStatehas the final say over whether a zoom level is allowed.TransformState::constrainModeisHeightOnly, there isn’t usually a reason to show more than one full revolution of the world at a time. Before this change, osxapp effectively constrained the zoom level based on whether the window was shorter or taller than 512 points. (Maps.app constrains the zoom level even further in standard view, but that’s because its satellite view is projected onto a globe, so it’s more appropriate at low zoom levels.)Transform::getMinZoom()to account for the constrained zoom level.These changes have the side effect of fixing an issue in the iOS SDK, in which the minimum zoom level in portrait can be circumvented by zooming out in landscape then rotating the device. Now the two orientations have consistent minimum zoom levels, which fully fixes #1755.
/cc @brunoabinader @friedbunny @zugaldia