react-native-maps: MapView props not working: showsMyLocationButton, userLocationAnnotationTitle, showsCompass
I’m trying to use the properties I mentioned and none of them seem to work.
When I tap on the user location, the default title appears, “My Location”. My custom title is never shown.
showsMyLocationButton and showsCompass never get displayed.
I’ve tried in both iPhone and iPhone simulator.
Here’s my dev info:
- react 15.4.2
- react native: 0.42
- react native maps: 0.14.0
Here’s how i’m initializing the MapView Component:
const title = "You are here";
<MapView
showsUserLocation={true}
showsMyLocationButton={true}
userLocationAnnotationTitle={title}
showsCompass={true}
style={styles.map}
region={{
latitude: coordinates.latitude,
longitude: coordinates.longitude,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
/>
Anyone else having a similar issue?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 35
- Comments: 20 (1 by maintainers)
None of the following are working for me:
showsScale={true}showsCompass={true}showsPointsOfInterest={true}showsBuildings={true}@alvelig I have the same issue on ios -
showsUserLocation={true}doesn’t not show the button.I tried
And also I using hack as in #1332 tread, but nothing helped me. This fix issue on android - now showUserLocation btn appears, but only on android.
I use rn version 0.52. and plugin version react-native-maps 0.20.1. (Using Apple provider)
showsMyLocationButton={true}on iOS only works withprovider={PROVIDER_GOOGLE}for me. Can’t get a location button on Apple Maps.This is still an issue. These 4 don’t work for me.
showsUserLocation={true} showsMyLocationButton={true} showsCompass={true} showsScale={true}
Same here. Any ideas when the fix will be updated to the master?