ArcGISVectorTiledLayer.withVectorTileCache constructor

ArcGISVectorTiledLayer.withVectorTileCache(
  1. VectorTileCache vectorTileCache,
  2. {ItemResourceCache? itemResourceCache}
)

Creates an ArcGIS Vector Tiled Layer from a vector tile cache and an item resource cache containing a custom style for this vector tile layer.

Parameters:

  • vectorTileCache — A VectorTileCache.
  • itemResourceCache — The item resource cache contains a custom style.

Implementation

factory ArcGISVectorTiledLayer.withVectorTileCache(
    VectorTileCache vectorTileCache,
    {ItemResourceCache? itemResourceCache}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_ArcGISVectorTiledLayer_createWithVectorTileCacheAndItemResourceCache(
            vectorTileCache._handle,
            itemResourceCache?._handle ?? ffi.nullptr,
            errorHandler);
  });
  final ArcGISVectorTiledLayer object =
      Layer._instanceCache.instanceWith(handle);
  object._itemResourceCache.cache(itemResourceCache);
  return object;
}