-
-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: all of the ref methods of Camera component are not working #3704
Comments
So i have done some brief analysis regarding this issue - if you call cameraRef methods in callback using some button or just call them ~100 miliseconds after view is initialised it works fine. |
any solution for this issue? |
I found that |
yes. moved to another map ) |
Even though I added your patch, I still face the same issue of .flyTo being useless useFocusEffect(
useCallback(() => {
if (!coordinates) return;
cameraRef.current?.flyTo(coordinates);
}, [coordinates]),
);
return ( <Camera
ref={cameraRef}
centerCoordinate={currentCoordinates}
followZoomLevel={14}
zoomLevel={14}
/>
) Any other solutions, help is greatly appreciated |
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.76.3
Platform
Android
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
Nothing happens.
Also zoomTo, moveTo, setCamera methods are not working. No errors, no warnings. Just not working.
Expected behavior
Camera flies to given coordinates.
Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered: