About tile packages
A tile package allows you to create a set of tiles (images) from a map, then use the set of tiles as a basemap in ArcGIS applications.
The tiles are wrapped into a single file, a .tpk file, so you can share the file as you would any file. You can email it, copy it to a network locale, upload it to ArcGIS Online, and so on.
You can also use the file to provision devices and applications that run offline (applications that can run disconnected from ArcGIS Server or ArcGIS Online), such as applications built with ArcGIS Runtime SDK for Java, iOS, Windows Mobile, and WPF.
The set of tiles is known as a tile cache. Basemaps made of pre-made tiles this way typically display more quickly than other basemaps. Although it will take you time to create the tile package, the cost is a one-time cost. Users of the resulting basemap will not have to wait for the images to be created. The more users you have, the higher the benefit of that one-time cost.
However, if the data you need to show on your basemap must be live, with no time delay acceptable, then tile packaging is not appropriate. Because a tile package represents a snapshot of your map at one point in time, the package works best with maps that do not change frequently, such as street maps, imagery, and terrain maps.
If some delay between tile package updates is acceptable, to determine whether tile packages will suit your needs, consider the size of the tile package and how widespread the changes for each update would be. A large tile package takes more time to create. It may be practical to update your large tile package only if you can isolate the changed areas and update those areas only. If the tile package is small, you may be able to quickly rebuild the entire package each update. If the update cannot keep up with the changes in an acceptable amount of time, the map is not appropriate for tile packaging.
For additional advantages of using tile packages, see Why should I create tile packages?
Before you create a tile package, consider the following:
- Scales and scale dependencies—For details, see the "Tiling scheme" section below and Choosing scales and setting scale dependencies.
- Layer control—For details, see Planning layer visibility.
- If you're overlaying caches:
- Boundaries— For details, see the "Tiling scheme" section below.
- Coordinate systems—For details, see Choosing a coordinate system.
Tile package options
Upload package to my ArcGIS Online account —Use this option to share a package with a wide audience by sharing to your ArcGIS Online account. Once you have uploaded the package to your online account, you can share it within your private groups or with everyone.
Save package to file—Packages can be shared locally by writing a package file to disk. Like any other file format, a package can be shared through email or by copying and pasting to other locations on your internal network.
The following image illustrates saving a tile package to a local directory.
The tiling scheme includes the scale levels, tile dimensions, and tile origin for the cache. These properties define where tile boundaries will exist and are important to match when overlaying caches in some clients. Other properties such as image format are also written into the tiling scheme but do not affect whether the client application can successfully overlay the tiles.
There are several options you can choose for the tiling scheme:
ArcGIS Online / Bing Maps / Google Maps
The ArcGIS Online/Bing Maps/Google Maps tiling scheme allows you to overlay your cache tiles with tiles from these online mapping services. ArcGIS for Desktop includes this tiling scheme as a built-in option when loading a tiling scheme. When you choose this tiling scheme, the data frame of your source map document must use the WGS 1984 Web Mercator (Auxiliary Sphere) projected coordinate system.
The ArcGIS Online/Bing Maps/Google Maps tiling scheme is required if you'll be overlaying your package with ArcGIS Online, Bing Maps, or Google Maps. One advantage of the ArcGIS Online/Bing Maps/Google Maps tiling scheme is that it is widely known in the web mapping world, so your tiles will match those of other organizations who have used this tiling scheme. Even if you don't plan to overlay any of these well-known map services, you may choose the tiling scheme for its interoperability potential.
The ArcGIS Online/Bing Maps/Google Maps tiling scheme may contain scales that would be zoomed in too far to be of use to your map. Packaging for large scales can take up much time and disk storage space. For example, the largest scale in the tiling scheme is about 1:1,000. Packaging the entire continental United States at this scale can take weeks and require hundreds of gigabytes of storage. If you aren't prepared to package at this scale level, you should remove this scale level when you create the tile package.
An existing map service
Choose this option if your organization has created a tiling scheme for an existing service on your GIS server and you want to match it. Matching tiling schemes ensures that your tiles will overlay correctly in your application.
If you choose this option, your source map document should use the same coordinate system as the map whose tiling scheme you are importing.
A tiling scheme file
All tile packages have a tiling scheme file conf.xml in the package directory (example: C:\Documents and Settings\username\My Documents\ArcGIS\packages\MyDataFrame\Layers\conf.xml). You can browse to this file to set the tiling scheme for your map service. This option allows you to use a tiling scheme file you obtained through e-mail, a file share, or an ArcGIS for Server service.
Create a custom tiling scheme
Choosing a tiling scheme from an online mapping service is not always possible due to requirements that you use a different coordinate system or set of scale levels. In this scenario, you will need to create your own tiling scheme. The following sections in this document will help you choose appropriate scales and other properties for your tiling scheme.
ArcGIS Online previously used a tiling scheme based on the WGS 1984 geographic coordinate system that used 512 x 512 pixel tiles. If you have services running that need to use this tiling scheme, you must load it from an existing service or a tiling scheme file.
This setting determines what output image format the map service will use when it creates the tiles. Your choice of image format is important, because it determines the size on disk of the tiles, the image quality, and the ability to make the tile background transparent.
The default image format is PNG 8, but you may often need to change this based on the type of map you are creating. Below is a summary of the available image formats and their appropriate uses.
- PNG8—Use PNG 8 for overlay services that need to have a transparent background, such as roads and boundaries. PNG 8 creates tiles of very small size on disk with no loss of information.
Do not use PNG 8 if your map contains more than 256 colors. Imagery, hillshades, gradient fills, transparency, and antialiasing can easily push your map over 256 colors. Even symbols such as highway shields may have subtle antialiasing around the edges that unexpectedly adds colors to your map.
- PNG24—You can use PNG 24 for overlay services, such as roads and boundaries, that have more than 256 colors (if fewer than 256 colors, use PNG 8).
- PNG32—Use PNG 32 for overlay services, such as roads and boundaries, that have more than 256 colors. PNG 32 is an especially good choice for overlay services that have antialiasing enabled on lines or text. PNG 32 creates larger tiles on disk than PNG 24, but the tiles are fully supported in all browsers.
- JPEG—Use this format for basemap services that have large color variation and do not need to have a transparent background. For example, raster imagery and very detailed vector basemaps tend to work well with JPEG.
JPEG is a lossy image format. It attempts to selectively remove data without affecting the appearance of the image. This can cause very small tile sizes on disk, but if your map contains vector linework or labels, it may produce too much noise or blurry area around the lines. If this is the case, you can attempt to raise the compression value from the default of 75. A higher value, such as 90, may balance an acceptable quality of linework with the small tile size benefit of the JPEG.
It's up to you to decide what image quality you consider acceptable. If you are willing to accept a minor amount of noise in the images, you may save large amounts of disk space by choosing JPEG. The smaller tile size also means the application can download the tiles faster.
- Mixed—A Mixed package uses JPEG in the center of the package with PNG 32 on the edge of the package. Use the mixed mode when you want to cleanly overlay raster packages on other layers.
When a mixed package is created, PNG 32 tiles are created anywhere that transparency is detected (in other words, anywhere that the data frame background is visible). The rest of the tiles are built using JPEG. This keeps the average file size down while providing you with a clean overlay on top of other packages. If you do not use the mixed mode package in this scenario, you will see a nontransparent "collar" around the periphery of your image where it overlaps the other package.
Before committing to an image format for a large package, build a small package of a representative area of your map and examine the tile quality and performance in a test application. If you'll be working with multiple packages, build a small test package for each and add them to a test application to make sure they overlay as expected. This will allow you to make adjustments before you create the entire package.
Levels of detail
Select the highest level of detail that you wish to generate your tiles to. The display will indicate the scale of data that you should expect to see at the selected level of detail. Each increase in the level of detail increases the time to create the tile package and the size of the tile package.
Entering information about the package
The Item Description allows you to provide details about the package to users. The Item Description dialog box provides the following fields where you can enter information describing the package. This includes
- Summary - Contains brief information about your package. This is a required field.
- Tags - Tags make it easier to find this package when you or someone else searches for it. Separate tags with a single comma(,). This is a required field.
- Description - Can contain more detailed information about your package.
- Access and Use Constraints - Any limitations regarding use, data or distribution.
- Credits - Acknowledgment indicating who contributed to the package.
Any changes you make to item descriptions pre-populated from the Map Document Properties..., will not be reflected in the map document properties. The changes you make will only be for the package itself.
Before packaging a map, be sure to enter descriptive information about it in the Map Document Properties dialog box. This information is built into the package and is accessible to others when you upload your map package into ArcGIS Online. You can access this dialog box by clicking File > Map Document Properties on the main menu.
For more information on setting Map Document Properties to pre-populate the Item Description seeSetting_map_document_properties
Below is an example of the Item Description dialog.
Tile packages are supported from ArcGIS 10.1 for Desktop onwards. Tile package will fail to open with older ArcGIS for Desktop versions (10 or older).