fix(maplibre): align map props with MapOptions - #2612
Open
miakh wants to merge 2 commits into
Open
Conversation
tordans
reviewed
Aug 28, 2026
| The padding in pixels around the viewport. | ||
|
|
||
| #### `minZoom`: number {#minzoom} | ||
| #### `minZoom`: number | null {#minzoom} |
Contributor
There was a problem hiding this comment.
Are those not number/undefined/null?
Author
There was a problem hiding this comment.
Yes — optional React props also include undefined. Updated the docs to show the full type.
| maxPitch: null | ||
| }; | ||
|
|
||
| void mapProps; |
Contributor
There was a problem hiding this comment.
Is this something this project does? Also the declare above.
Author
There was a problem hiding this comment.
You’re right. This pattern is not established in the repository, so I removed it.
| @@ -0,0 +1,12 @@ | |||
| { | |||
| "extends": "../../tsconfig.json", | |||
Contributor
There was a problem hiding this comment.
Personally I don't understand this part. Like the whole "consumer test".
Author
There was a problem hiding this comment.
Agreed. I removed the standalone consumer test. The types now derive directly from MapOptions, with runtime coverage in the existing test suites.
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.
Closes #2611.
MapLibre reactive map props now derive directly from the corresponding
MapOptionsfields:minZoom,maxZoom,minPitch,maxPitch,maxBounds, andrenderWorldCopies.Nullable camera constraints consistently use the native MapLibre reset behavior during initialization, rerenders, and
reuseMaps. Constraint updates preserve safe min/max setter ordering without hardcoding MapLibre defaults.Added coverage for
null, explicitundefined, omitted props, reused maps, and high custom ranges. Removed the standalone consumer type-test setup in favor of the existing component and utility test suites.Validation: TypeScript build, repository lint, and all 84 node/headless tests pass.