【发布时间】:2019-04-27 18:55:14
【问题描述】:
showsMyLocationButton 选项不适用于 iOS。最初该按钮也没有在 Android 上显示,但我在实施 github 问题中建议的 hack 后显示它(强制重新渲染)。
如何在 iOS 上显示按钮?我应该自己制作按钮吗?
<MapView
style={styles.map, { flex: 1, marginBottom: this.state.marginBottom }}
onMapReady={this._onMapReady}
initialRegion={initialRegion}
showsUserLocation={true}
//onPanDrag={e => console.log(e.nativeEvent)}
followsUserLocation={true}
showsMyLocationButton={true}
>
react-native-maps: 0.21.0
反应:16.4.1
【问题讨论】:
标签: ios react-native react-native-maps