[英]Android Mapbox Mapview shows white screen before rendering maps
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
}
}
}
截圖鏈接:截圖鏈接
不得不將顏色更改為另一種: mapboxMapOptions.foregroundLoadColor(int color)
我們嘗試屏蔽 glsurfaceview 已加載但我們沒有任何內容要呈現,因為我們仍在加載樣式定義。 而不是加載資源,讓它們離線也將改善用戶體驗。
歸功於 tobrun 的信息https://github.com/mapbox/mapbox-gl-native/issues/16367
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.