exportVectorTilesWithItemResourceCache method

ExportVectorTilesJob exportVectorTilesWithItemResourceCache(
  1. {required ExportVectorTilesParameters parameters,
  2. required Uri vectorTileCacheUri,
  3. required Uri itemResourceCacheUri}
)

Return a new export vector tiles job that can be used to generate and download a vector tile package and return a custom style as an item resource cache.

Parameters:

  • parameters — specifying which tiles to include in the vector tile package.
  • vectorTileCacheUri — The file path where the vector tiles will be saved on disk, including the desired file name ending with the .vtpk file extension.
  • itemResourceCacheUri — The directory path where the style file will be saved on disk.

Return Value: A new ExportVectorTilesJob to export the vector tiles from a service.

Implementation

ExportVectorTilesJob exportVectorTilesWithItemResourceCache(
    {required ExportVectorTilesParameters parameters,
    required Uri vectorTileCacheUri,
    required Uri itemResourceCacheUri}) {
  final coreVectorTileCacheUri = _CString(vectorTileCacheUri.toFilePath());
  final coreItemResourceCacheUri =
      _CString(itemResourceCacheUri.toFilePath());
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_ExportVectorTilesTask_exportVectorTilesWithItemResourceCache(
            _handle,
            parameters._handle,
            coreVectorTileCacheUri.bytes,
            coreItemResourceCacheUri.bytes,
            errorHandler);
  });
  return ExportVectorTilesJob._fromHandle(objectHandle)!;
}