Expose coveringTiles() in transform objects#5239
Closed
jonathanlurie wants to merge 3 commits intomaplibre:mainfrom
Closed
Expose coveringTiles() in transform objects#5239jonathanlurie wants to merge 3 commits intomaplibre:mainfrom
coveringTiles() in transform objects#5239jonathanlurie wants to merge 3 commits intomaplibre:mainfrom
Conversation
coveringTiles()coveringTiles() in transform objects
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5239 +/- ##
==========================================
- Coverage 91.83% 91.82% -0.02%
==========================================
Files 281 281
Lines 38833 38845 +12
Branches 6779 6821 +42
==========================================
+ Hits 35661 35668 +7
- Misses 3044 3048 +4
- Partials 128 129 +1 ☔ View full report in Codecov by Sentry. |
Collaborator
|
This is a change in the opposite direction of what we are looking to do. I would advise to think of a better way to expose this. |
HarelM
requested changes
Dec 18, 2024
Collaborator
HarelM
left a comment
There was a problem hiding this comment.
See my previous comment.
Collaborator
|
Closing this for now as there was no response, if this is still relevant please let me know and I'll reopen. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Launch Checklist
CHANGELOG.mdunder the## mainsection.Description
Before the work on globe, the function
.coveringTiles()used to be a method of theTransformobject, it was very convenient to access the list of tiles (with z, x and y indices) that were currently displayed. This PR aims at bringing this function back to themap.transformobject.Motivations
We (at MapTiler but we are not the only ones) are creating tiled layers to display raster data. These tiles are WebGL polygons with the same footprints as regular raster tiles, just with custom shaders. When only using Mercator it was fairly easy to figure out the math to know what tile should be displayed, but with the globe view, it is much more difficult. Since the list of tiles is computed internally in Maplibre, it would be great to expose it so that third-party plugins can use it.
Contrary to a previous PR I submitted (#5158), this one does not add any function or object to the official public API.
Usage
The
tileSizeattribute is the only one mandatory (as in the internalcoveringTiles()function). Since it's the default size is always512, we could make it the default value if not provided.