maplibre-react-native
maplibre-react-native copied to clipboard
`flyTo()` with unchanged parameters only works once on iOS with new Architecture
trafficstars
Initially reported in: https://github.com/maplibre/maplibre-react-native/discussions/517
import {
Camera,
type CameraRef,
MapView,
} from "@maplibre/maplibre-react-native";
import { createRef } from "react";
import { Pressable, Text } from "react-native";
import { sheet } from "../styles/sheet";
export function BugReport() {
const cameraRef = createRef<CameraRef>();
return (
<>
<Pressable
onPress={() => {
cameraRef.current?.flyTo([10, 10]);
}}
>
<Text>Fly to</Text>
</Pressable>
<MapView style={sheet.matchParent}>
<Camera ref={cameraRef} />
</MapView>
</>
);
}
With this example it's only broken on iOS with the new architecture.