@maplayr/react-native
    Preparing search index...

    Function useLocation

    • Hook to access the user's current location. The location updates automatically as the user moves.

      Important: This hook does not request location permissions. You must request permissions separately before location data will be available.

      Returns Location | null

      The current location or null if location is not available

      const currentLocation = useLocation();

      if (currentLocation) {
      console.log(`Lat: ${currentLocation.latitude}, Lon: ${currentLocation.longitude}`);
      }