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

Changed TileLayer's default (native) zoom levels #1627

Merged
merged 2 commits into from
Sep 8, 2023
Merged

Conversation

JaffaKetchup
Copy link
Member

Fixes #1625.

The issue was already apparently resolved in v6 'master', however, it did not appear that way due to a likely conflict between the default maxZoom and specified maxNativeZoom, where the maxZoom's effect took priority.

Changes have been made to the defaults, as follows:

  • minZoom: 0
  • maxZoom: double.infinity
  • minNativeZoom: 0 (non-nullable)
  • maxNativeZoom: 19 (non-nullable)

Changes have also been made to the documentation to reflect more appropriate usage recommendations and remove/correct confusing information.

The internal _clampToNativeZoom implementation has also been massively simplified to use Dart's native clamp method.

Made min and max native zoom levels non-nullable
Improved and corrected documentation
Improved internal `_clampToNativeZoom` implementation
@JaffaKetchup JaffaKetchup changed the title Changed TileLayer's defaults for zoom levels Changed TileLayer's default (native) zoom levels Aug 29, 2023
Copy link
Collaborator

@TesteurManiak TesteurManiak left a comment

Choose a reason for hiding this comment

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

LGTM

@JaffaKetchup JaffaKetchup merged commit d65881c into master Sep 8, 2023
7 checks passed
@JaffaKetchup JaffaKetchup deleted the fix-1625 branch September 8, 2023 11:04
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.

[BUG] maxNativeZoom does not work since v4
2 participants