1

I need to cache a few tiles for the offline part of my application. Though in the samples provided for Android the following server link has been used for exporting local tile chache:

http://sampleserver6.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer

the sample itself can be found here:

https://developers.arcgis.com/android/sample-code/export-tile-cache/

Where only levels 1-9 are supported. How can I download for higher levels? Or, what is the ESRI server link to export higher level tile packages?

P.S. I have already tried other REST services

1

The level of details are set by the service and the sample is based on the service you referenced which has 10 levels of detail. Here is the Esri basemap service which supports 20 levels of detail > http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer. With respect to the sample you referenced, you can update the items ArrayList and the AlertDialog.Builder to fit the size of the array to match the levels of detail:

E.g.

    // update the ArrayList with level of detail
    final CharSequence[] items = { "Level ID:0", "Level ID:1", "Level ID:2",
        "Level ID:3", "Level ID:4", "Level ID:5", "Level ID:6",
        "Level ID:7", "Level ID:8", "Level ID:9", "Level ID:10",
        "Level ID:11", "Level ID:12", "Level ID:13", "Level ID:14",
        "Level ID:15", "Level ID:16", "Level ID:17", "Level ID:18",
        "Level ID:19", };
// update the resolution for levels of detail
double[] mapResolution = { 156543.03392800014, 78271.51696399994,
        39135.75848200009, 19567.87924099992, 9783.93962049996,
        4891.96981024998, 2445.98490512499, 1222.992452562495,
        611.4962262813797, 305.74811314055756, 152.87405657041106,
        76.43702828507324, 38.21851414253662, 19.10925707126831,
        9.554628535634155, 4.77731426794937, 2.388657133974685,
        1.1943285668550503, 0.5971642835598172, 0.29858214164761665 };

        // update the dialog to support levels
        // in the showDialog() method
        builder.setMultiChoiceItems(items, new boolean[] { false, false, false,
                    false, false, false, false, false, false, false, false, false,
                    false, false, false, false, false, false, false, false },
2
  • The server you are referring to does not support Export Tile Cache at the bottom of the page, Supported Operations section. – user2770916 May 6 '15 at 6:06
  • good point, so that service will not work. Bottom line is the service sets the level of detail not the ArcGIS Android SDK/API. – jdONeill May 6 '15 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.