Skip to content Skip to sidebar Skip to footer

Remove Or Move 'reset North' Button On Android Studio For Mapbox

I was wondering if there was a way to move the location of the 'Reset North' button that is generated by Mapbox. It is in the top right of the screen where my EditText (search) is,

Solution 1:

I had the same error until I realized that I was putting the padding or compass margins in my onCreate(Bundle) and not my onMapReady(@NonNull MapboxMap).

Therefore in your onMapReady(@NonNull MapboxMap) you can put the following code at the end of the method:

MainActivity.this.mapboxMap.getUiSettings().setCompassMargins(left, top, right, bottom);

Alternatively you can use this, if you want to set the padding around all components in the MapboxMap:

MainActivity.this.mapboxMap.setPadding(left, top, right, bottom);

Post a Comment for "Remove Or Move 'reset North' Button On Android Studio For Mapbox"