I'm trying to use Mapbox with compose, but the map is not showing correctly. I try:
@Composable
fun MapView(
modifier: Modifier = Modifier
) {
AndroidView(
modifier = Modifier.fillMaxSize(),
factory = { context ->
var map = MapView(context).apply {
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
getMapboxMap().apply {
cameraOptions {
zoom(19.0)
}
}
}
map
}
)
}
But display empty: