Mapbox SDK (バージョン 0.7.3) を使用してローカルの .mbtiles ファイルを読み込んで表示する基本的な Android アプリがありますが、最初にアプリを読み込むと (黒い画面が表示されます)、タイルを読み込むときにかなりの遅延が発生します。起動時に表示されているタイルだけでなく、すべてのタイルをロードしているようです。これを変更する方法はありますか。.mbtiles ファイルのサイズは約 257 MB で、アプリが起動してからマップが表示されるまでに約 40 秒かかります。
どんな助けでも大歓迎です。
タイルが読み込まれる場所は次のとおりです。
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