setCustomVectorSourceTileData method

Future<CommandCompletion> setCustomVectorSourceTileData(
  1. String sourceId,
  2. CanonicalTileId tileId,
  3. StyleVectorTileEncoding encoding,
  4. Uint8List data,
)

Sets the data of a tile in a custom vector source.

data is the tile, encoded as encoding. The source ignores data for a tile that it hasn't asked for, or has since cancelled.

See mln_map_set_custom_vector_source_tile_data in the C API reference.

Errors:

  • Status.notFound when the style has no source named sourceId.
  • Status.invalidArgument when the source named sourceId isn't a custom vector source.

Implementation

Future<CommandCompletion> setCustomVectorSourceTileData(
  String sourceId,
  CanonicalTileId tileId,
  StyleVectorTileEncoding encoding,
  Uint8List data,
) => _command(
  (arena, completion) => raw.mln_map_set_custom_vector_source_tile_data(
    _handle.raw,
    nativeStringView(sourceId, arena).value,
    _writeCanonicalTileId(tileId, arena).ref,
    encoding.rawValue,
    nativeBufferView(data, arena),
    completion,
    nativeDiagnostic,
  ),
);