showsMyLocationButton在android 中不工作
<MapView
style={styles.map}
region={this.state.initalRegion}
showsUserLocation={`enter code here`true}
showsMyLocationButton={true}
</MapView>
<View
style={[styles.container, {paddingTop: this.state.statusBarHeight}]}>
<MapView
onMapReady={() => {
setTimeout(() => this.setState({statusBarHeight: 1}), 500);
setTimeout(() => this.setState({statusBarHeight: 0}), 750);
}}
这可能工作