I am facing an issue with the Location Button in my React Native Maps app. When the app is opened for the first time and the map is rendered, the button disappears. However, if I close the app but leave it running in the background, upon reopening the app, the button appears as expected like in this GIF:
Link: https://i.sstatic.net/x0xLa.jpg
Note:
I have come across similar issues in the main repository of React Native Maps, but the solutions provided did not work for me.
Another question:
The app did not prompt me to enable GPS location services upon the first launch, it only worked after manually opening them. I am using an Android 8 device.
Here is a snippet of my code:
import React, { Component } from 'react';
import MapView, { Marker } from 'react-native-maps';
import { View, Text, StyleSheet, Dimensions } from 'react-native';
let { width, height } = Dimensions.get('window');
const LATITUDE = 31.78825;
const LONGITUDE = 34.4324;
const LATITUDE_DELTA = 0.0922;
const LONGITUDE_DELTA = 0.0421;
// rest of the code remains unchanged
export default Map;