Repository navigation
fix: frame Apple static base map correctly with edge insets - #98
Merged
Merged
Conversation
MKMapView fits the visible rect into its layout-margin viewport, so the inset warmup map rendered zoomed out and off-center from the overlay projection. Pass the viewport slice of mapRect instead. Example: fittedCamera takes edge insets and derives the Apple zoom from the full view; detail card follows the safe-area bottom inset.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
With nonzero
edgeInsets, the Apple static path renders through a temporaryMKMapViewwhoselayoutMarginsare the insets (to keep attribution inside the viewport). It passed the provider'smapRect, which is already inset-shifted and sized for the whole view, so MKMapView fit it into the margin viewport: base tiles rendered zoomed out and re-centered while markers and shapes projected over the full view. Pass the viewport slice ofmapRectinstead so the fit putsmapRectover the full view, matching the overlay projection.Example changes:
fittedCameratakesinsets: content fits the inset viewport, Apple zoom derives from the full view's short side (insets only shift the center natively)MarkerDetailScreencard bottom follows the safe-area inset via abottomInsetprop from both app wrappersadvanced-patterns.mdmirrors the helper changeType of Change
Test Plan
yarn tscand eslint pass.Screenshots / Videos
N/A
Checklist