Context
Using
com.esri:arcgis-maps-kotlin-toolkit-geoview-compose:200.4.0
Issue
MapView(
isAttributionBarVisible = false
)
Attribution bar is still shown.
Hacky Solution
@Composable
private fun rememberAttributionBarVisibility(): Boolean {
// must be true by default - value must change to be applied
var isAttributionBarVisible by remember { mutableStateOf(true) }
SideEffect {
// fix attribution bar is not hidden by default
isAttributionBarVisible = false
}
return isAttributionBarVisible
}
Solved! Go to Solution.
After some more investigation, it seems like this is happening with older compose versions. Could you try updating to a more recent Compose BOM version (2024.01.00 or above)?
@dev4567 The MapView should be able to work with your original approach by passing in an isAttributionBarVisible to the MapView.
Check out the Display Composable MapView sample app, I'm able to toggle the attribution bar.
Could you provide more context on the Composable layout you are using and how exactly is the MapView being used?
After some more investigation, it seems like this is happening with older compose versions. Could you try updating to a more recent Compose BOM version (2024.01.00 or above)?
I confirm it works, thanks! The error occurred on 2024.03.00, but with 2024.05.00 it seems to be fine.