createDefaultDownloadPreplannedOfflineMapParameters method

Future<DownloadPreplannedOfflineMapParameters> createDefaultDownloadPreplannedOfflineMapParameters(
  1. {required PreplannedMapArea preplannedMapArea}
)

Returns a Future of DownloadPreplannedOfflineMapParameters created from the specified PreplannedMapArea.

A convenience method to create DownloadPreplannedOfflineMapParameters with default values appropriate for taking the specified map area offline.

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

Parameters:

  • preplannedMapArea — The offline map area that is to be downloaded from the online map.

Return Value: a Future of DownloadPreplannedOfflineMapParameters

Implementation

Future<DownloadPreplannedOfflineMapParameters>
    createDefaultDownloadPreplannedOfflineMapParameters(
        {required PreplannedMapArea preplannedMapArea}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_OfflineMapTask_createDefaultDownloadPreplannedOfflineMapParametersAsync(
            _handle, preplannedMapArea._handle, errorHandler);
  });
  return taskHandle.toFuture((element) =>
      element.getValueAsDownloadPreplannedOfflineMapParameters()!);
}