GenerateOfflineMapParameters

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

Link copied to clipboard
constructor()

Creates a generate offline map parameters object.

constructor(areaOfInterest: Geometry, minScale: Double? = null, maxScale: Double? = null)

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

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

The maximum scale for how far in to extract tiles from tiled services. The 0 default means extract the levels down to the most detailed. This is used as input for levels of detail for TileCache and VectorTileCache.

Link copied to clipboard

The minimum scale for how far out data will be in tile caches. The 0 default means extract all the available detailed levels to global scales. This is used as input for levels of detail for TileCache.

Link copied to clipboard

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:

Link copied to clipboard

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.

Link copied to clipboard

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).

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.