【发布时间】:2019-02-21 19:32:55
【问题描述】:
我正在处理本机地图,在地图上添加视图后,地图不会在滚动时移动。
通常当我向下或向上滚动时,我会看到地图的不同部分。但是,当添加View 时,地图会固定在一个位置,我无法看到地图的不同部分。
<MapView
provider={PROVIDER_GOOGLE}
initialRegion={this.state.region}
showsUserLocation = {true}
ref="map"
>
<View
style={{flex: 3, alignSelf: 'stretch',
textAlign: 'center'}}
>
<Button title="click here"/>
</View>
</MapView>
我需要view 的原因是添加其他组件,例如按钮输入字段等。
【问题讨论】:
标签: javascript react-native react-native-maps