We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export default function App() { useEffect(() => { if (Platform === 'android') { PermissionsAndroid.requestMultiple( [ PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION, ], { title: 'Give Location Permission', message: 'App needs location permission to find your position.', } ) .then((granted) => { console.log(granted); resolve(); }) .catch((err) => { console.warn(err); reject(err); }); } }); return ( <SafeAreaView style={styles.container}> <View style={styles.container}> <Mapir apiKey={"YOUR_MAPIR_API_KEY"} style={styles.container} > <Mapir.Camera zoomLevel={13} centerCoordinate={[51.422548, 35.732573]} /> <Mapir.UserLocation onUpdate={(e) => { console.log(e); }} /> </Mapir> </View> </SafeAreaView> ); } const styles = StyleSheet.create({ container: { flex: 1, }, });
i added this permission to AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
but i have error yet!
The text was updated successfully, but these errors were encountered:
Everything seems OK. Do you try clean Build? If you test this on Emulator, maybe you should test it on a real device!
Sorry, something went wrong.
first must be checked if app has permission show user location component , but you didn't write this check in your doc
No branches or pull requests
i added this permission to AndroidManifest.xml
but i have error yet!
The text was updated successfully, but these errors were encountered: