Taking your maps offline with Tile Package Creator

21732
30
01-30-2017 10:56 PM
IsmaelChivite
Esri Notable Contributor
13 30 21.7K
This blog post outlines a simple workflow to setup offline basemaps in Survey123 for ArcGIS with the recently released Esri Labs Tile Package Kreator tool.  Our Prepare basemaps for offline use—Survey123 for ArcGIS | ArcGIS help topic describes at length all the different options available. I strongly recommend that you have a look at the documentation to complement anything you may learn in this post.
 
The purpose of setting up offline basemaps in Survey123 for ArcGIS is to enable field users to navigate their maps even when working disconnected from a network. By default, surveys include a predefined collection of online basemaps. While you will still be able to use Survey123 in disconnected mode, by default the map preview will disappear when you go offline.  That is exactly why you want to configure your maps for offline use: so you can keep using your maps while not on a network.  Even if your mobile device has good cell coverage, you may want to configure your basemaps offline to avoid data transfer fees.
 

1) Creating Tile Package files with Tile Package Kreator

 
Tile Package (.tpk) is an Esri file format for delivering rasterized maps for offline use in ArcGIS applications. Tile Packages can be created from ArcGIS Desktop, but a new tool recently released under Esri Labs may fit your needs and simplify the process.  This tool is called Tile Package Kreator and is available in the ArcGIS Marketplace.
 

Esri Labs projects are developed by Esri employees and are inspired by our interactions with ArcGIS users like you. Esri Labs projects are free to use but are not official Esri products. These projects do not go through the rigorous software development cycle so they are not holistically tested, documented or supported by Esri technical support.

 Here are some basic  steps to get started with Tile Package Kreator:
.
  1. Download Tile Package Kreator from the ArcGIS Marketplace.
  1. Login with your ArcGIS Online credentials (sorry, no support for ArcGIS Enterprise just yet).
  1. Select Create a new Tile Package. A list of available basemaps from which you can create your Tile Packages will be now presented. This list will show all tiled services shared with you on which the exportTiles operation is enabled.
  1. Select a basemap from which you want to create a new Tile Package.
  1. Define your area of interest. This can be accomplished by either drawing a rectangle or defining a path and distance.  Try to keep your area of interest as tight as you can because the larger the area, the larger the output file will be. The path and distance option is pretty handy in cases where your area of interest follows a linear infrastructure (a pipeline or road for example), coastline or river.
  1. Set the number of zoom levels. This will determine the maximum level of detail in your offline map. The more  zoom levels, the bigger the file will be, but also the more detail field users will observe.
  1. Set the name of the output file.
  1. Choose to save the file locally. Kreator can upload output Tile Packages directly to your ArcGIS Online account, but in this case we will want to save the file locally.
  1. Click on Create Tile Package to initiate the process. Tile Package Kreation will happen asynchronously, so you can go back and start other tasks.  You can always look at the tasks you invoked in the past by selecting the History option in the top-right corner of Tile Package Kreator.
 
Tile Packages can get big pretty quickly so you will want to be careful when defining the area of interest and zoom levels. Tile Package Kreator can estimate the final size of your Tile Package when you select a rectangular extent. You will see the size estimate update as  you change the size of the area of interest or number of details.  Typically, all ArcGIS tiled services are configured with a threshold that defines the maximum number of  tiles that can be created from the service. This threshold will limit the total area and zoom levels you can extract.
 
Technically, a Tile Package file is basically a compressed file so you can change its extension to .zip to look at its  contents. You will observe that within the file there are a bunch of images and json and xml files defining the projection and tiling schema.
 

2) Configuring your own survey with a Tile Package

 
The easiest way to associate a Tile Package with your own survey is to drop the .tpk file into the  media folder of your survey.
.
  1. Open Survey123 Connect and select your survey
  1. Open the survey file directory by clicking on the folder icon in the left vertical toolbar in Connect.
  1. Copy one or more .tpk files into the media folder of your survey
  1. Publish your survey to ArcGIS (either ArcGIS Online or ArcGIS Enterprise)

Now that your Tile Package is part of the survey, you are guaranteed that any user who downloads the survey will  also have access to the offline basemap. There is nothing the user needs to do, other than selecting the basemap that he or she wants to use.
 

3) Using the offline basemap in the Survey123 field app

 
Next you will open the Survey123 field app in your own device and download the survey. Along with it, the offline basemap will be downloaded. To use the offline basemap, simply tap on a geopoint question. Once you have the map at full display, use the top-right menu to expand the list of available maps and select the offline map which will be by default be shown last.
 

Common questions:

 
Why are basemaps created with Tile Package Kreator always labeled as 'Layers' in the Survey123 field app?
You will notice that despite the name given to your Tile Package, the Survey123 field app will always label your offline basemap as 'Layers' in the basemap switcher. To fix this:
.
  1. Once you have copied the Tile Package file into the media folder, change the extension of the file from .tpk to .zip so you can open its contents.
  2. Browse for the iteminfo.xml file within the esriinfo directory and set the <title> element to the label you want to be used. For example, if you want the title to be Esri Campus Imagery, change edit the <title>Layers</title> tag to: <title>Esri Campus Imagery</title>
  3. Save the iteminfo.xml file and change the extension of the .zip file back to .tpk so you can publish the survey aga

I have multiple groups of people working in the field, each in its own area. If I create a Tile Package  to cover all the areas, its size is too big. How can I handle this?

You can publish multiple surveys each with its associated offline basemap.

.
  1. Create a Tile Package for each area you want to cover

  2. Publish one survey per area and associate each survey with its corresponding Tile Package. Configure all surveys to work against the same feature service, so all data submitted is merged into a single feature service.

  3. Have field users download surveys corresponding to the areas they are going to work on.

Can I control the default basemap shown in the map?  What about reducing the number of basemaps in the list?

You can take full control over the list of basemaps presented to users in the  survey. For example, you can choose to only show the offline basemaps, or to drop or add additional basemaps to the list. You can also control which basemap will be selected by default. The Prepare basemaps for offline use—Survey123 for ArcGIS | ArcGIS help topic describes these settings at length these.

Since Tile Package Kreator is not an Esri product, how can I submit enhancement requests and issues?

Tile  Package Kreator is an open source project. You can submit enhancement requests, issues and even contribute to the source code through Github.

Is Tile Package Kreator supported by Esri?

No. You need to refer to its Github repo.

Can I use Tile Packages created in ArcGIS Desktop with Survey123?

Yes.

Can I use Tile Packages in Survey123 in a projection other than Web Mercator Auxiliary Sphere?

No.

Is Esri planning to add support for Vector Tiles in Survey123 for ArcGIS?

Vector Tile support is sitting in our back-log at the moment, although we do not have a specific deadline at the moment for it.

30 Comments