5

How is possible to adjust the logo and attribution in com.mapbox.mapboxsdk.maps.MapView? In the older SDK v9, it was possible to simply set UiSettings via XML attributes (or by changing UiSettings programmatically).

mapbox:mapbox_uiAttributionMarginBottom="8dp"
mapbox:mapbox_uiAttributionMarginLeft="32dp"

Any idea how to achieve the same effect on Mapbox SDK v10?

Francis
  • 6,788
  • 5
  • 47
  • 64

2 Answers2

4

I am using Mapbox android 10.4.0 and this is how I do. Hope it helps!

 mapView.attribution.updateSettings {
            marginRight= 56F
            marginLeft= 56F
        }
 mapView.logo.updateSettings {
        marginBottom= 420F
        marginLeft= 320F
    }
2

Hello in v10+ they change to plugins, so the logo settings and UI settings you need to install:

implementation 'com.mapbox.plugin:maps-logo:10.2.0'

in your Gradle.build file.

Source: https://github.com/mapbox/mapbox-maps-android/tree/main/plugin-logo