Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compass location on react-native Mapbox map

Is it possible to change the location of the compass in React-Native Mapbox GL? It currently defaults to the top-right and I have been trying to find how to move it to the top-left.

<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}>
like image 781
jengin Avatar asked Feb 12 '26 04:02

jengin


1 Answers

It's possible with iOS - since #389. See compassViewPosition and compassViewMargins on MapView

like image 195
mfazekas Avatar answered Feb 16 '26 02:02

mfazekas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!