3

是否可以在 React-Native Mapbox GL 中更改指南针的位置?它目前默认为右上角,我一直在尝试找到如何将其移动到左上角。

<Mapbox.MapView
                    ref={component => this.map = component}
                    styleURL={this.state.mapStreetView}
                    zoomLevel={this.state.defaultZoom}
                    centerCoordinate={[this.state.long, this.state.lat]}
                    showUserLocation={true}
                    onPress={this.onLocationPress}
                    zoomEnabled={true}>
4

2 回答 2

1

使用 iOS 是可能的 - 从#389开始。见compassViewPositioncompassViewMarginsMapView

于 2020-02-03T06:59:09.047 回答
0

不,您不能移动指南针位置,您只能使用 compassEnabled 属性显示或隐藏它。(https://github.com/react-native-mapbox-gl/maps/blob/master/docs/MapView.md

于 2019-08-12T06:10:35.910 回答