I cannot seem to find any examples of how to do ExportTileCacheTask in 100.1.0. The process is very different and some guidance would be much appreciated. The pattern seems to be something like...
// estimate tile cache size final EstimateTileCacheSizeJob objs = tileCacheTask.estimateTileCacheSizeAsync(params); tileCacheTask.addDoneLoadingListener(new Runnable() { @Override public void run() { //do stuff
} }); and something like this for the actual export...
tileCacheTask.exportTileCacheAsync(params, tpkPath); tileCacheTask.addDoneLoadingListener(new Runnable() { @Override public void run() { if(tileCacheTask.getLoadStatus() == LoadStatus.LOADED) { runSuccessOutcome(); }else{ //errored String theError = tileCacheTask.getLoadError().getMessage(); runErrorOutcome(theError); } } }); Critically setting up the parameters seems very different....This is the old way....ExportBy.ID no longer exists.// set up parameters ExportTileCacheParameters params = new ExportTileCacheParameters(true, levels, ExportBy.ID, extent, mapRef);
Long story short a solid example would be greatly helpful. I am pretty sure I am not the only person banging my head against a wall on this one.
Hi Aaron Dick,
One suggestion is that when you create the ExportTileCacheParameters, you can use getLevelIDs() which returns a modifiable list where you can specify the levels you want to export.
The ExportBy.ID was used to specify that the export task should be exported by level of detail:
ExportTileCacheParameters.ExportBy | ArcGIS Android 10.2.9 API
Since this was the only value in the enumeration, I don't believe it added much value to the end user to specify ExportBy.ID every time they wished to export a tile cache since I don't recall any other valid options being available here (I could be mistaken).
I hope this helps in the interim until a sample is available.