Generate Offline Map Parameters
The parameters that specify how an offline map is generated and downloaded from an online map using a GenerateOfflineMapJob. The online map must be a web map either on ArcGIS Online or ArcGIS Enterprise.
To generate parameters with appropriate default values which take into account the online map and the data it contains, call OfflineMapTask.createDefaultGenerateOfflineMapParameters(Geometry)). You can then modify the parameters with any desired changes. Alternatively, you can generate an empty set of parameters using GenerateOfflineMapParameters.GenerateOfflineMapParameters() and set the parameters individually. To create a GenerateOfflineMapJob, pass the parameters to the OfflineMapTask.generateOfflineMap(GenerateOfflineMapParameters, String) method and provide a path to a folder where the map content is stored on the device.
Since
200.1.0
Constructors
Creates a generate offline map parameters object.
Creates a generate offline map parameters object. The area of interest must have a spatial reference. If minScale or maxScale is null that implies there is no bound on the scale. If both are non-zero, they must both be positive with minScale greater than maxScale.
Properties
The area of interest for the offline map. This is used for the extent of offline tile caches, geodatabases and the offline map's GeoModel.initialViewpoint property. The supported geometry types for the area of interest are Envelope and Polygon. The area of interest must have a spatial reference. Where a Polygon is supplied, features and tiles will be filtered according to the polygon geometry, which can help reduce the size of the resulting offline map. Note that the filtered set of tiles may vary, depending on the underlying service.
Specifies the direction for attachments to be synchronized when syncing offline feature layers. This method should be used in conjunction with GenerateOfflineMapParameters.returnLayerAttachmentOption to determine which layers should be taken offline with attachments included. This property is valid when the service resource sync capabilities includes supportsAttachmentsSyncDirection otherwise it is ignored.
Indicates whether or not the generate offline map job should continue running in the event of failure to take a layer offline. If this property is true, failure to take a layer or table offline will not fail the job, the failure will be exposed in the job result. If this property is false, failure to take a layer or table offline will fail the job and no more layers or tables will be taken offline. The layer or table's error will be available as the job's error. The default value is true.
Indicates whether tables will contain all rows or can be filtered to a smaller set of related rows. When the property is DestinationTableRowFilter.RelatedOnly (the default) this can substantially reduce the number of rows in offline tables to only those that are related to rows from other layers or tables. Only tables present in GeoModel.tables are considered as candidates for filtering.
Describes how Esri vector tiled basemap layers will be downloaded. This property lets you choose how to download Esri vector tiled basemap layers. This property only applies when taking an Esri vector tile basemap service offline.
Indicates whether or not a basemap will be included in the offline map. If you do not want a basemap in the offline map then set this property to FALSE. After loading the offline map, your application can programmatically insert a basemap into the map. Note that, a programmatically inserted basemap will not be persisted in the map.
Indicates if feature layer definition expressions are used when taking feature layers and tables offline. A value of true allows GenerateOfflineMapJob to use the SQL where clause in FeatureLayer.definitionExpression as a filter when generating offline geodatabases.
Offline map item info used for the local item properties in the offline map. If this property is null then the properties are copied from the portal item.
Describes how data that requires an online service will be handled when taking a map offline. Online layers and tables cannot be taken offline in the following situations:
The path to a directory on the device where the local basemap file is located. Set this property to use a basemap that is already on the device (rather than downloading it). The directory should only be set when the parameters have a GenerateOfflineMapParameters.referenceBasemapFilename defined.
The name of a local basemap file on the device that can be used rather than downloading an online basemap. The local basemap filename must end with .tpk, .tpkx or .vtpk since these are the supported file formats. This property can be read directly from settings applied by the author of the online web map (see OfflineSettings) or set by user code to a file known to be on the device. This property will be populated from online settings when created with OfflineMapTask.createDefaultGenerateOfflineMapParameters(Geometry).
Which feature layers will include attachments when being taken offline. Attachments can be included with none of the layers, all of the layers, read only layers or editable layers. This method should be used in conjunction with GenerateOfflineMapParameters.attachmentSyncDirection to control how the attachments are synced. For offline maps, a feature layer is considered to be editable if the feature service has capabilities that include any of create, update or delete. A read-only layer is one that supports sync, but does not have any of create, update or delete capability. Service capabilities are accessible from service infos see ArcGISFeatureServiceInfo.featureServiceCapabilities or ArcGISFeatureLayerInfo.capabilities.
Whether or not feature layers taken offline should be schema only and contain no data. For an upload only type workflow, this property can be set to true to take feature layers offline with no existing data in them. If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.
Describes how the offline map will support synchronization with online services. A value of GenerateOfflineMapUpdateMode.SyncWithFeatureServices instructs the GenerateOfflineMapJob to create offline geodatabases that support syncing with online feature services.