AnsweredAssumed Answered

ExportTileCacheTask 100.1.0

Question asked by jaarons47 on Jul 31, 2017
Latest reply on Aug 1, 2017 by ANohe-esristaff

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.

Outcomes