Skip to content

Conversation

JaffaKetchup
Copy link
Member

Whilst some layers may technically function with an infinite/NaN zoom (I haven't tested), the TileLayer definitely doesn't, and it doesn't make conceptual sense for the other layers too.

Fixes #2135, but not at the camera fitting, as this feels like a better catch-all.

Change `MapCamera.initialCamera` to be a redirecting constructor
@JaffaKetchup JaffaKetchup requested a review from a team August 7, 2025 22:56
@JaffaKetchup JaffaKetchup changed the title fix: throw if MapCamera is constructed with a non-finite zoom fix: assert MapCamera.zoom is finite on construction Aug 7, 2025
JaffaKetchup added a commit that referenced this pull request Aug 7, 2025
Copy link
Contributor

@josxha josxha left a comment

Choose a reason for hiding this comment

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

👍

@JaffaKetchup JaffaKetchup merged commit b26fb40 into master Sep 19, 2025
7 checks passed
@JaffaKetchup JaffaKetchup deleted the finite-only-zoom branch September 19, 2025 08:03
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.

Infinite MapCamera.zoom (caused by fitting to zero-area bounds) causes errors in TileLayer
3 participants