Arcgis Runtime for andriod 100 加载TPK

private void LoadTPK() {

YLPub.pContext = this;
String path = YLPub.getMapData() + "/gismap/map.tpk";
mMapView = (MapView) findViewById(R.id.mapView);
try {
//String theOfflineTiledLayers = "/sdcard/Hymn/basemap/ImageBasemap.tpk";

TileCache mainTileCache = new TileCache(path);
ArcGISTiledLayer mainArcGISTiledLayer = new ArcGISTiledLayer(mainTileCache);
Basemap mainBasemap = new Basemap(mainArcGISTiledLayer);
pMap = new ArcGISMap(mainBasemap);
mMapView.setMap(pMap);

} catch (Exception e) {
YLPub.ShowMessage("文件:" + path + "不存在");
}

}
原文地址:https://www.cnblogs.com/gisoracle/p/7406953.html