-
|
How can i animated the map to the current location once the map loads. Is there a way for this ? |
Beta Was this translation helpful? Give feedback.
Answered by
pinpong
Nov 24, 2025
Replies: 3 comments
-
|
You can use const camera: RNCameraUpdate = {
center: { latitude: 37.7749, longitude: -122.4194 },
zoom: 12,
bearing: 0,
tilt: 0,
};
mapRef.current?.setCamera(camera, true, 1000); |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@pinpong tried this and got
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It's not working without a ref: import React, { useRef } from 'react';
import {
GoogleMapsView,
type GoogleMapsViewRef,
} from 'react-native-google-maps-plus';
import { callback } from 'react-native-nitro-modules';
const mapRef = useRef<GoogleMapsViewRef | null>(null);
return (
<GoogleMapsView
hybridRef={callback((ref) => {
mapRef.current = ref;
})}
/>
); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
basitmir
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

It's not working without a ref: