fix: ProjectionDataParams no longer requires OverscaledTileID instance#7471
fix: ProjectionDataParams no longer requires OverscaledTileID instance#7471kubapelc wants to merge 2 commits intomaplibre:mainfrom
Conversation
6eca7fa to
3173405
Compare
|
Transform is not really a part of the public API. |
|
Hi! My original intention when implementing globe was for https://maplibre.org/maplibre-gl-js/docs/examples/add-a-custom-layer-with-tiles-to-a-globe/ Scope of this PR is only to fix the function's parameter types to make sure it can be used properly without creating |
|
I don't think it was ever exposed as is, but that's besides the point. |
81beb76 to
3285b7f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7471 +/- ##
=======================================
Coverage 92.77% 92.77%
=======================================
Files 289 289
Lines 24021 24030 +9
Branches 5100 5105 +5
=======================================
+ Hits 22286 22295 +9
Misses 1735 1735 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Okay, I see no harm in exposing |
transform.getProjectionData()is part of the public API that is useful when rendering completely custom tiles, but theProjectionDataParamsobject it accepts as parameter requires an instance ofOverscaledTileID, which is only exported as a type by MapLibre. This makes it cumbersome to use, since there is no easy way of creating anOverscaledTileIDinstance.This PR modifies the
ProjectionDataParamsobject to also accepts an object literal, in addition to anOverscaledTileIDinstance, making it easy to use by external code.getProjectionDataimplementations are also modified to accept this object literal.There doesn't seem to be a preexisting issue for this, and it was a simple fix, so I went ahead and implemented it.
Launch Checklist
CHANGELOG.mdunder the## mainsection.