returnLayerAttachmentOption property

ReturnLayerAttachmentOption returnLayerAttachmentOption

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.

This property works in conjunction with GenerateOfflineMapParameters.attachmentSyncDirection and in some cases may override the value returned by GenerateOfflineMapParameters.attachmentSyncDirection. The table below shows the valid combinations of values for layer attachment options and attachment sync direction. The notes column explains where the behavior for a given layer may differ from the values set for these properties.

Layer Attachment Option Valid Attachment Sync Direction Note
ReturnLayerAttachmentOption.none AttachmentSyncDirection.none
AttachmentSyncDirection.upload
ReturnLayerAttachmentOption.allLayers AttachmentSyncDirection.upload
AttachmentSyncDirection.bidirectional
ReturnLayerAttachmentOption.readOnlyLayers AttachmentSyncDirection.none Layers with attachments will treat this as AttachmentSyncDirection.bidirectional
AttachmentSyncDirection.upload
AttachmentSyncDirection.bidirectional Layers without attachments will treat this as AttachmentSyncDirection.none
ReturnLayerAttachmentOption.editableLayers AttachmentSyncDirection.none Layers with attachments will treat this as AttachmentSyncDirection.bidirectional
AttachmentSyncDirection.upload
AttachmentSyncDirection.bidirectional Layers without attachments will treat this as AttachmentSyncDirection.none

If GenerateOfflineMapParameters is used in conjunction with GenerateOfflineMapParameterOverrides this property is superseded.

Implementation

ReturnLayerAttachmentOption get returnLayerAttachmentOption {
  final coreValue = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_GenerateOfflineMapParameters_getReturnLayerAttachmentOption(
      _handle,
      errorHandler,
    );
  });
  return ReturnLayerAttachmentOption._fromCoreValue(
    coreValue,
  );
}
void returnLayerAttachmentOption=(ReturnLayerAttachmentOption value)

Implementation

set returnLayerAttachmentOption(ReturnLayerAttachmentOption value) {
  _withThrowingErrorHandler((errorHandler) {
    runtimecore
        .RT_GenerateOfflineMapParameters_setReturnLayerAttachmentOption(
      _handle,
      value.coreValue,
      errorHandler,
    );
  });
}