Arcgis Runtime for andriod 100 加载TPK

时间:2023-03-09 21:53:55
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 + "不存在");
} }