1. 程式人生 > >Arcgis Runtime for andriod 100 加載TPK

Arcgis Runtime for andriod 100 加載TPK

for led image eba pda basemap pmap get mapview

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 + "不存在");
}

}

Arcgis Runtime for andriod 100 加載TPK