0
我有一个基本的Android应用程序,它使用Mapbox SDK(版本0.7.3)加载和显示本地.mbtiles文件,但首次加载应用程序时会出现明显的延迟(导致黑屏),同时加载瓷砖。看起来它可能正在加载所有的贴图(不仅仅是启动时可见的贴图)。有没有办法改变这一点。 .mbtiles文件的大小约为257 MB,应用程序在启动后显示地图大约需要40秒。减少Mapbox Android SDK中离线mbtiles图层的加载时间
任何帮助将不胜感激。
这里就是瓦片被加载:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.findViewById(R.id.mapview);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setZoom(9);
mapView.setMinZoomLevel(8);
mapView.setMaxZoomLevel(15);
mapView.setCenter(new LatLng(55.676111, 12.568333));
mapView.setTileSource(new MBTilesLayer(this, "DK_underlay_1_0_4.mbtiles"));
}
,这里是被日志示出加载应用程序时,一个〜40第二间隙:
04-29 11:07:54.173 23590-23590/com.example.stugrey.testapp D/MapboxMapView﹕ centerLatLng is not specified in XML.
04-29 11:07:54.173 23590-23590/com.example.stugrey.testapp D/Mapbox MapView﹕ zoomLevel is not specified in XML.
04-29 11:08:34.236 23590-23590/com.example.stugrey.testapp D/AppUtils﹕ Device density is 320, and result of @2x check is true
04-29 11:08:34.236 23590-23590/com.example.stugrey.testapp D/MapTileDownloader﹕ Going to use @2x tiles? 'true'
04-29 11:08:34.308 23590-23590/com.example.stugrey.testapp I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.018_msm8226_LNX.LA.3.5.1_RB1__release_AU()
OpenGL ES Shader Compiler Version: E031.24.00.08
Build Date: 03/07/14 Fri
Local Branch:
Remote Branch: quic/LNX.LA.3.5.1_RB1.1
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.018 + f2fd134 + NOTHING