Mapbox Mapview在呈现Mapview之前显示白色屏幕闪烁。闪光灯停留约500毫秒,之后显示地图。我正在运行时动态地将Mapview添加到我的FrameLayout((addView())。下面是代码段。请帮助!
private fun initializeMapBoxMap() {
val mapView = MapView(context) // create new mapview
innerLayout.addView(mapView) // add mapView to the FrameLayout
mapView.getMapAsync { mapboxMap ->
// white screen shown at this point for 500 ms
mapboxMap.setStyle(Style.DARK) {
// white screen gone at this point
}
}
}
屏幕快照链接:screenshot link
必须使用以下方法将颜色更改为另一种:mapboxMapOptions.foregroundLoadColor(int color)
我们尝试掩盖glsurfaceview已加载,但由于仍在加载样式定义,因此没有任何要渲染的内容。不用加载资源,而是使它们脱机也可以改善用户体验。
贷方可获取该信息https://github.com/mapbox/mapbox-gl-native/issues/16367