maplibre-react-native icon indicating copy to clipboard operation
maplibre-react-native copied to clipboard

`flyTo()` with unchanged parameters only works once on iOS with new Architecture

Open KiwiKilian opened this issue 11 months ago • 4 comments
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.

KiwiKilian avatar Dec 20 '24 20:12 KiwiKilian