this.tileCache = new TileCache(tpk.getAbsolutePath());
this.tileCache.loadAsync();
this.tileCache.addDoneLoadingListener(() -> {
if (tileCache.getLoadStatus() == LoadStatus.LOADED) {
if (loadMetadata()) {
this.valid = true;
}
} else if (tileCache.getLoadStatus() == LoadStatus.FAILED_TO_LOAD) {
ArcGISRuntimeException error = tileCache.getLoadError();
if (error != null) {
logger.error("{} 加载失败原因: {}", tpk.getName(), error.getMessage());
} else {
logger.error("加载失败,但未捕获到具体的错误对象。");
}
} else {
logger.error("Load tpk failed: {}", tpk.getAbsolutePath());
}
this.loaded = true;
});
can not read compact tpk, only support for compact_v2 ?
can not read compact tpk, only support for compact_v2 ?