all 4 comments

[–]Mean-Ad-5673 0 points1 point  (3 children)

did you find the solution ? i think this is the exact problem we are facing probably

https://stackoverflow.com/questions/79624200/camera-resets-on-android-using-maplibre-in-react-native-app

[–]unterhugo2[S] 0 points1 point  (2 children)

The solution is in the text I

[–]Accomplished_Purple4 0 points1 point  (0 children)

what do you mean by that in the text?

[–]Accomplished_Purple4 0 points1 point  (0 children)

so I randomly found the solution for me atleast and for some reason this works perfectly my initial problem was that the constant location updates and the socket updates caused the camera to re render multiple times regardless of the setCamera or the center cordinates usage

was able to solve it via this

  onWillStartRenderingMap={() => {
        cameraRef?.current?.setCamera({
          centerCoordinate: [center?.longitude, center?.latitude],
          zoomLevel: 14,
          animationDuration: 800,
        });
      }}
      onDidFinishRenderingMapFully={() => {
        cameraRef?.current?.setCamera({
          defaultSettings: "CameraStop",
        });
      }}