Repository navigation
Conversation
ciospettw
had a problem deploying
to
CI with Mapbox Tokens
April 3, 2026 13:33 — with
GitHub Actions
Failure
ciospettw
had a problem deploying
to
CI with Mapbox Tokens
April 3, 2026 13:33 — with
GitHub Actions
Failure
ciospettw
had a problem deploying
to
CI with Mapbox Tokens
April 3, 2026 13:33 — with
GitHub Actions
Failure
Contributor
|
We incorporated this as a patch and find it very useful. Thank you! |
7 of 8 tasks
Contributor
|
Thanks a lot for this, @ciospettw, and sorry for the long wait. We dug into the pinch-zoom lag and found the main cause elsewhere: on Android every So I'm closing this for now rather than adding a throttle on top. Once #4359 lands, could you re-measure your case on it? If camera-change events are still a measurable bottleneck, we'll happily reconsider a native throttle. I'll keep #4192 open for that. |
mfazekas
added a commit
that referenced
this pull request
Oct 19, 2026
…ead of echoing it through JS (#4359) Mapbox positions marker views natively (translationX/Y on Android, the annotation view's frame on iOS), which the shadow tree doesn't see, so measure()/measureInWindow() returned the Yoga position and Pressable cancelled presses as soon as the finger moved (#3832). #4176 fixed this on Android by sending every position change to JS and re-rendering a matching transform, which costs a React render per marker per frame while the map moves (#4193). RNMBXMarkerViewContent now has a custom C++ shadow node whose getTransform() adds a per-marker offset read from a native side table (RNMBXMarkerViewContentTranslations). Android writes it through JNI when Mapbox sets translationX/Y, iOS from the annotation frame. Nothing is committed while the map moves, and measure is current without a touch, which also fixes move-taps and measureInWindow on iOS. The spec stays interfaceOnly; react-native.config.js registers the custom component descriptor and points autolinking at android/src/main/jni, and the podspec compiles cpp/ on iOS. Fixes #4193
This branch had an error being 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.
Description
Fixes #4192
Added
cameraChangedThrottleIntervaltoMapViewso apps can opt into native throttling foronCameraChangedduring gesture-heavy interactions.The default remains
0, so existing behavior is unchanged unless the new prop is explicitly set.This PR also updates the
Map Handlersexample and synchronizes the related docs so the new prop is discoverable and easy to validate.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Screenshot OR Video
Not included.
Component to reproduce the issue you're fixing
Notes
cameraChangedThrottleIntervalis fully opt-in and defaults to0, so omitting it preserves the current event behavior.docs/MapView.mdanddocs/examples.jsonin this checkout.yarn generatechecklist item unchecked becausenode .yarn/releases/yarn-3.6.1.cjs generatecurrently fails locally in this environment withTypeError: Yallist is not a constructorfromhosted-git-infoon Node 22.jest __tests__/components/MapView.test.jspasses.