Creating tpk file

20469
16
Jump to solution
06-30-2015 05:25 AM
LAOJimmy
New Contributor II

Hi,

I would like to include a local tile cache (tpk-file) into a Java App because I want to have an offline mode.

I tried to download a small area from http://www.arcgis.com/home/item.html?id=e384f5aa4eb1433c92afff09500b073d  with ArcMap 10.3 but I get an error : 00005 : Layer type is not supported.

Anyone has solved this problem ?

Thanks,

Jimmy

Tags (4)
1 Solution

Accepted Solutions
nita14
by
Occasional Contributor III

Hi Jimmy,

It is possible. In fact, it is not so difficult to achieve. Follow these instructions:

1) Go to http://tiledbasemaps.arcgis.com/arcgis/rest/

2) Paste required token. To get token, you need create developers.arcgis.com or arcgis online account (it is free).Log in to developers.arcgis.com. Next, Click Applications >Register New Application (give a name and description - whatever you want)> Register New Application >  Generate Token

3) Select the basemap of your choice (i.e. World_Street_Map) and click Export tiles or paste URL  http://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Street_Map/MapServer/exportTiles

4) Fill in all required parameters. You will find some help about Export Tiles task here

For Export extent specify boundary of the tpk, you want  to generate. xmin , xmax etc. are in decimal degrees, for example 10.233

For Export By specify LeveID. Below add the level numbers: 1(smallest scale) 19 (the largest scale). Above only 1 to 13 levels are requested.

Watch out the maximum tiles to export constraint. It is set to100 000 tiles. If you encounter such error, adjust the number of cache (tiles) levels or extent to export.

5) Click Export tiles (POST). Tile generation process has been started.

6) After a while, click Check Job Details Again- it checks the status of geoprocessing.

7) As soon as the process has been finished, you will get the results by clicking out_service_url

😎 Copy value field content URL to the new browser tab

9) Click Layers.tpk to download the data

You are ready to go!

View solution in original post

16 Replies
BenGrod
Occasional Contributor III

I don't believe any of Esri's basemaps, even those designed for export, are content which can be run against the Create Tile Package tools. The Tile Package tools are only for local content or services which you host. You can take the Esri basemaps offline through tools within the Collector app but the file size is limited to less than 5MB. Outside of the Collector app offline tools I do not know a way to create tile packages on the Esri basemaps. However, someone else may know of a way. Hope this is helpful and good luck.

nita14
by
Occasional Contributor III

Hi Jimmy,

It is possible. In fact, it is not so difficult to achieve. Follow these instructions:

1) Go to http://tiledbasemaps.arcgis.com/arcgis/rest/

2) Paste required token. To get token, you need create developers.arcgis.com or arcgis online account (it is free).Log in to developers.arcgis.com. Next, Click Applications >Register New Application (give a name and description - whatever you want)> Register New Application >  Generate Token

3) Select the basemap of your choice (i.e. World_Street_Map) and click Export tiles or paste URL  http://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Street_Map/MapServer/exportTiles

4) Fill in all required parameters. You will find some help about Export Tiles task here

For Export extent specify boundary of the tpk, you want  to generate. xmin , xmax etc. are in decimal degrees, for example 10.233

For Export By specify LeveID. Below add the level numbers: 1(smallest scale) 19 (the largest scale). Above only 1 to 13 levels are requested.

Watch out the maximum tiles to export constraint. It is set to100 000 tiles. If you encounter such error, adjust the number of cache (tiles) levels or extent to export.

5) Click Export tiles (POST). Tile generation process has been started.

6) After a while, click Check Job Details Again- it checks the status of geoprocessing.

7) As soon as the process has been finished, you will get the results by clicking out_service_url

😎 Copy value field content URL to the new browser tab

9) Click Layers.tpk to download the data

You are ready to go!

LAOJimmy
New Contributor II

Thanks a lot Adam for your tutorial !

ehsanrashidi
New Contributor

Hi

Thank you for your tutorial Adam,

Actually there is a problem with the last step of your tutorial.

I have gone through the steps you have provided in your tutorial, but unfortunately there is no Layers.tpk link for download(or at least I can't find it).

Could you please provide more information about the last step.

Thanks in advance

0 Kudos
nita14
by
Occasional Contributor III

Ehsan,

Please attach printscreen of the geoprocessing output page. Are there any errrors returned?

There is another option to get a Tile package from the Esri Basemaps:

- Use Collector for ArcGIS to download tpk (offline workflow) and then copy tpk from your smartphone to PC.

Take maps offline—Collector for ArcGIS | ArcGIS

Regards,

Adam

0 Kudos
ehsanrashidi
New Contributor

Adam

Finally I found the download link of Layers.tpk , It was my mistake which I couldn't find it.

I just copied/pasted the link you have included in step 8 of your tutorial to the address bar of browser and

there was the download link.

Thank you any way.

0 Kudos
RiverTaig1
Occasional Contributor

Thank you for getting me started on this - it was VERY helpful.  A couple of questions though: (1) I have defined a polygon that is irregular (long and thin going SW -NE) I use that for the Area of Interest parameter.  Unfortunately, while I am getting a valid tpk out for that area, it is the entire bounding box for that area, not the tiles just along the diagonals that I would have expected. Am I doing something wrong? (2) How can I combine the tiles of one tpk with that of another?

Thank you!

0 Kudos
nita14
by
Occasional Contributor III

Hi,

ad 1) It seems that ArcGIS 10.2.2 had a bug, not allowing to export tile cache using irregular shape (BUG-000083421). Tiled basemaps servers (what is recommended and used in tutorial) still use 10.2.2 version of ArcGIS.

I have made a test with World_Street_Map (MapServer) which is 10.3 version of ArcGIS Server (this bug was addressed in this release), and it works as expected. It supports irregular shapes. Do not forget, that the boundary of export cache depends of requested scales (i.e tile sizes). The bigger the scale is, the output boundary is more accurate and  more resembles the input geometry.

ad 2) Indeed, you can give a shot. Tpk is just a zip file, so if you want, you can examine its structure and try to change the tiles inside of it. Normally, I wouldn't do it, just try to play around with 2 layers and set transparency accordingly.

Hope this helps,

Adam

by Anonymous User
Not applicable

Hello,

This is my first experience with tiles so this may be something simple. I followed the guidelines given by Adam and successfully downloaded the tpk file to my computer. When I open the file with ArcMap there is nothing displayed. I know there is something there given the file size. Any help would be appreciated!

Thanks,

Colin

0 Kudos