📅  最后修改于: 2022-03-11 15:00:25.604000             🧑  作者: Mango
AndroidView(
modifier = modifier,
factory = { context ->
Mapbox.getInstance(
context,
public_api_key
)
MapView(context).apply {
getMapAsync { mapboxMap ->
mapboxMap.setStyle(Style.MAPBOX_STREETS)
val position = CameraPosition.Builder()
.zoom(19.0)
.build()
mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(position), 1)
}
}
}
)