Skip to content

Can't explore map when followUserLocation is set on Android #658

Answered by KiwiKilian
Maxhu787 asked this question in Q&A
Discussion options

You must be logged in to vote

Can you reproduce this on the old architecture? In my testing it seems to behave the same – I can freely move around and the camera is not realigned, when a new user location is detected.

I've used this example:

import { Camera, MapView, UserLocation } from "@maplibre/maplibre-react-native";

export function BugReport() {
  return (
    <MapView style={{ flex: 1 }}>
      <Camera followUserLocation followZoomLevel={16} />
      <UserLocation />
    </MapView>
  );
}

Anyway, to keep you prop in sync with the Camera you should use the onUserTrackingModeChange event, something like this:

import { Camera, MapView, UserLocation } from "@maplibre/maplibre-react-native";
import { useState } from 

Replies: 6 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by KiwiKilian
Comment options

You must be logged in to vote
2 replies
@KiwiKilian
Comment options

@Maxhu787
Comment options

Comment options

You must be logged in to vote
2 replies
@KiwiKilian
Comment options

@Maxhu787
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #648 on February 26, 2025 06:17.