📌  相关文章
📜  使用 Jetpack Compose 创建 Mapbox 地图 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:25.604000             🧑  作者: Mango

代码示例1
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)
                }
            }
        }
    )