Offline Basemaps similar to ArcGIS Collector and Simulate Offline Device

12-08-2015 11:47 AM
New Contributor III

Hello All,  I would like to develop an app with offline capabilities with the ability to download basemaps as tile packages similar to ArcGIS Collector.  Is there a sample that show the workflow for accomplishing this?  Does anyone have a workflow (code sample) they would be willing to share that does this.  Also, is there a way within QT Creator to simulate offline mode when testing the apps using appstudio?

0 Kudos
4 Replies
Esri Frequent Contributor


If you have access to the Runtime SDK samples, you can reference the Tiled Layers > "Download tile cache online" sample. It shows how to take an online service that has the Export Tiles capability enabled, and generate a tile cache to use offline with ArcGISLocalTiledLayer.

What do you mean for simulating offline mode? AppFramework should have an isOnline type of flag that will tell you if you have a network connection or not. Maybe you could turn off your WiFi to simulate going in offline mode?


0 Kudos
Esri Notable Contributor

Hi Shane,

a good starting point is the Download Package Sample included with AppStudio for ArcGIS. Here is how you can find it:

  1. Open AppStudio for ArcGIS Desktop Edition
  2. Login with your ArcGIS Online credentials
  3. Expand the Search (top-right corner) and expand the Groups section
  4. Check the Sample Apps Group
  5. Download the Internal Package and Download TPK samples

To run the samples, simply double click on them on your Desktop.

  • Download TPK: When the app starts, it checks to see if a TPK is stored locally. If not, it reaches out to ArcGIS Online and downloads the TPK. Once the TPK is local, it is added to the map. At the moment, you can go offline and use the map.  I like this sample because it shows how you can separate the app and the TPK, allowing for easy updates to your TPK without having to touch the app.  The sample can be modified to have the app download the package again if the date in ArcGIS Online is newer than the local file.
  • Internal Package: This sample embeds the TPK with your app

To open the source code, simply select the sample in the gallery, and push the Qt Creator button.  To run the app from within Creator do a Alt-Shift-R.

Hope it helps.


Esri Regular Contributor

A description of how to deploy local offline data with you app can be found here

0 Kudos
New Contributor III

Thank you all for your helpful responses.  Luke, the Runtime SDK samples has exactly what I was looking for and much more.  This will definitely aid in the development of our app moving forward.


0 Kudos