React Native 地图:移动 myLocationButton
React Native Maps : moving myLocationButton
有没有办法移动MyLocationButton的位置?
我正在使用 Mapview,上面有一些额外的视图。其中一个视图位于 MyLocationButton 之上,从美学上讲,我想保持它那样 --> 所以我应该移动 MyLocationButton。有办法吗? x
<MapView
style={styles.map}
showsMyLocationButton = {true}
showsUserLocation = {true}
provider={PROVIDER_GOOGLE}
customMapStyle={mapStyle}
initialRegion={{
latitude: this.state.mylocation.coords.latitude,
longitude: this.state.mylocation.coords.longitude,
latitudeDelta: 0.0922,//Zoom
longitudeDelta: 0.0421,//Zoom
}}>
如果对某人有帮助,我找到了在地图继续覆盖整个屏幕的同时移动按钮位置的解决方案:
<MapView
(...)
mapPadding={{top:0, right:0, left:0, bottom:230}}>
(...)
</Mapview>
有没有办法移动MyLocationButton的位置? 我正在使用 Mapview,上面有一些额外的视图。其中一个视图位于 MyLocationButton 之上,从美学上讲,我想保持它那样 --> 所以我应该移动 MyLocationButton。有办法吗? x
<MapView
style={styles.map}
showsMyLocationButton = {true}
showsUserLocation = {true}
provider={PROVIDER_GOOGLE}
customMapStyle={mapStyle}
initialRegion={{
latitude: this.state.mylocation.coords.latitude,
longitude: this.state.mylocation.coords.longitude,
latitudeDelta: 0.0922,//Zoom
longitudeDelta: 0.0421,//Zoom
}}>
如果对某人有帮助,我找到了在地图继续覆盖整个屏幕的同时移动按钮位置的解决方案:
<MapView
(...)
mapPadding={{top:0, right:0, left:0, bottom:230}}>
(...)
</Mapview>