Skip to content

fix(android): fix negative minDisplacement, fix location on v10 and v11#3089

Merged
mfazekas merged 1 commit intomainfrom
mfazekas/android-loc
Oct 1, 2023
Merged

fix(android): fix negative minDisplacement, fix location on v10 and v11#3089
mfazekas merged 1 commit intomainfrom
mfazekas/android-loc

Conversation

@mfazekas
Copy link
Contributor

@mfazekas mfazekas commented Sep 30, 2023

Fixes: #2717

@mfazekas mfazekas changed the title feat(android): fix negative minDisplacement, fix location on v10 and v11 fix(android): fix negative minDisplacement, fix location on v10 and v11 Sep 30, 2023
@mfazekas
Copy link
Contributor Author

Tested with this component:

// also added `yarn add react-native-geolocation-service`
import React, { useContext, useEffect, useRef, useState } from 'react';
import Mapbox from '@rnmapbox/maps';
import {
  Alert,
  Dimensions,
  FlatList,
  Image,
  StyleSheet,
  Text,
  View,
} from 'react-native';

function BugReportExample() {
  return (
    <View style={{ flex: 1 }}>
      <Mapbox.MapView preferredFramesPerSecond={120} style={{ flex: 1 }}>
        <Mapbox.Camera zoomLevel={10} />

        <Mapbox.UserLocation
          visible={true}
          animated={true}
          showsUserHeadingIndicator={true}
          androidRenderMode={'compass'}
          onUpdate={(location) =>
            console.log('=> user location changed:', location)
          }
        />
      </Mapbox.MapView>
    </View>
  );
}

export default BugReportExample;

@mfazekas mfazekas merged commit 8e490a9 into main Oct 1, 2023
@mfazekas mfazekas deleted the mfazekas/android-loc branch October 1, 2023 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: UserLocation doesn't work with other GeoLocation Services (Android)

1 participant