createDefaultGenerateOfflineMapParameters method

Future<GenerateOfflineMapParameters> createDefaultGenerateOfflineMapParameters(
  1. {required Geometry areaOfInterest,
  2. double minScale = 0.0,
  3. double maxScale = 0.0}
)

Returns a Future of GenerateOfflineMapParameters created from the specified area of interest, min scale and max scale.

Parameters:

Return Value: A Future of GenerateOfflineMapParameters.

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.

The returned GenerateOfflineMapParameters has its itemInfo property initialized from the offline map task's portal item, if that is set.

The ItemInfo's thumbnail will be copied from the portal item's thumbnail.

The default parameters will be populated using the values in the online map's OfflineSettings (if present).

If the map being taken offline contains an UtilityNetwork and is in an ArcGIS Enterprise 11.1 or later service, the Offline Capability selected for the UtilityNetwork such as "Trace utility network features" will automatically be reflected in the default parameters created by this method. If the map being taken offline contains an UtilityNetwork and is in an earlier version of ArcGIS Enterprise, the GenerateGeodatabaseParameters.utilityNetworkSyncMode property is set to UtilityNetworkSyncMode.syncSystemTables for the Geodatabase containing the UtilityNetwork. Use OfflineMapTask.createGenerateOfflineMapParameterOverrides to change the UtilityNetworkSyncMode if desired.

Implementation

Future<GenerateOfflineMapParameters>
    createDefaultGenerateOfflineMapParameters(
        {required Geometry areaOfInterest,
        double minScale = 0.0,
        double maxScale = 0.0}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_OfflineMapTask_createDefaultGenerateOfflineMapParametersWithAreaOfInterestMinScaleMaxScaleAsync(
            _handle,
            areaOfInterest._handle,
            minScale,
            maxScale,
            errorHandler);
  });
  return taskHandle.toFuture(
      (element) => element.getValueAsGenerateOfflineMapParameters()!);
}