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

fix!: added integer tileDimension & deprecated tileSize #1940

Merged
merged 6 commits into from
Nov 18, 2024

Conversation

JaffaKetchup
Copy link
Member

@JaffaKetchup JaffaKetchup commented Aug 5, 2024

Fixes #1936.

There's no apparent reason that tileSize would be anything but an integer, since it is not possible to get tiles in fractional pixels. The WMS layer already assumed this. This PR relies on this assumption, and a different fix would be needed for #1936 if this assumption is not valid.

This is breaking, particularly for those using more internal functionality. However, for most users, it should not be breaking. Those which are using tileSize explicitly currently will have a deprecation message, but functionality will not change. Additionally, the 'temporary' fix for #1936 (just converting the number to an integer before a string) is also implemented if not using the new tileDimension.

Minor documentation improvements
@JaffaKetchup
Copy link
Member Author

We'll leave this to review and merge before a major upgrade.

@JaffaKetchup JaffaKetchup marked this pull request as draft September 12, 2024 18:46
josxha
josxha previously approved these changes Sep 12, 2024
@TesteurManiak
Copy link
Collaborator

As a way of making this less breaking, you could deprecate tileSize for a tileDimension parameter?

@JaffaKetchup
Copy link
Member Author

As a way of making this less breaking, you could deprecate tileSize for a tileDimension` parameter?

I don't see why that wouldn't work, I'd be happy to do that if you think that's better.

Deprecated `TileLayer.tileSize` & made nullable
Reflected new name throughout internals and semi-internals
@JaffaKetchup JaffaKetchup changed the title fix!: changed type of tileSize to integer fix!: added integer tileDimension replacing deprecated tileSize Nov 17, 2024
@JaffaKetchup JaffaKetchup changed the title fix!: added integer tileDimension replacing deprecated tileSize fix!: added integer tileDimension & deprecated tileSize Nov 17, 2024
@JaffaKetchup JaffaKetchup marked this pull request as ready for review November 17, 2024 21:35
@JaffaKetchup JaffaKetchup dismissed josxha’s stale review November 17, 2024 21:36

Implementation significantly changed

@JaffaKetchup
Copy link
Member Author

I've done what @TesteurManiak suggested.

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 6e395ea into master Nov 18, 2024
8 checks passed
@JaffaKetchup JaffaKetchup deleted the int-tilesize branch November 18, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] {d} urlTemplate placeholder improperly converted to string on non-web platforms
3 participants