Hi,
Hopefully this helps.
Taking layers offline using ArcGIS Runtime
- ExportTileCacheTask Class is used to generate a TPK file from a service that supports export operation
- GeodatabaseSyncTask Class is used to generate a geodatabase file from a service that has sync enabled
Taking a map offline using ArcGIS Runtime
- OfflineMapTask Class is used to generate a mobile map package based on a webmap which is using services that support operations mentioned above. Feature collections are set of features that are stored directly in webmaps or they live in a JSON format in an ArcGIS Portal item.
Creating layers for offline use with ArcMap
- ArcMap seems to work only with local content which means that if you create the geodatabase based on the feature service, it won't at the moment return any layers in it. The documentation indicates that this shouldn't work but I would assume that loading the geodatabase should fail instead it returning zero tables. I have raised a question to see if this is an area that we can do something. What comes to the TPK creation, the data also needs to be local (non-service based).
- If you want to use ArcMap to create the geodatabase, you first need to create a local copy from the data. This can be done by many different ways but one example is to use Feature Class To Geodatabase—Help | ArcGIS for Desktop tool.
- Note that it will copy only the data so you need to set the renderer / other needed information to the layers. You can, for example, create Layer Packages from the Feature Service layers and then apply them to the layers in your MXD by using Apply Symbology From Layer—Help | ArcGIS for Desktop
- If you create the geodatabase from the new map with full extent, it should work without problems.
Here is a picture from the linked service running in Runtime with a local geodatabase which was created with 10.5 ArcMap.
Please note that the service is in WGS84 projection so if you want to use our basemaps with the data, you need to project the local data first to the Web Mercator projection.