|
@@ -864,10 +864,12 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
setIsZooming(true);
|
|
|
|
|
|
const currentZoom = await mapRef.current.getZoom();
|
|
|
- const currentCenter = await mapRef.current.getCenter();
|
|
|
-
|
|
|
setZoom(currentZoom);
|
|
|
- setCenter(currentCenter);
|
|
|
+
|
|
|
+ if (mapRef.current) {
|
|
|
+ const currentCenter = await mapRef.current?.getCenter();
|
|
|
+ setCenter(currentCenter);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const onMapPress = async (event: any) => {
|