小编bps*_*v21的帖子

在airbnb / react-native-maps中自定义我的位置按钮

我已使用airbnb / react-native-maps设计基于跟踪的应用程序。我设计了一个自定义搜索框。但是问题是,搜索框与我的位置按钮重叠。有什么方法可以自定义我的位置按钮并更改其对齐位置?我附了一张照片以获取更多说明。

这是我使用的示例代码

                 <MapView
                    provider={PROVIDER_GOOGLE}
                    style={styles.map}
                    region={{
                        latitude: this.props.initialPosition.latitude,
                        longitude: this.props.initialPosition.longitude,
                        latitudeDelta: Latitude_Delta,
                        longitudeDelta: Longitude_Delta
                    }}
                    zoomEnabled={true}
                    minZoomLevel={5}
                    maxZoomLevel={20}
                    showsMyLocationButton={true}
                    showsUserLocation={true}
                    ... ... ...
                   >
                   {... ... ... ...}
                   </MapView>
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

reactjs react-native airbnb-js-styleguide

8
推荐指数
1
解决办法
3405
查看次数