setCustomGeometrySourceTileData method

Future<CommandCompletion> setCustomGeometrySourceTileData(
  1. String sourceId,
  2. CanonicalTileId tileId,
  3. Object? data
)

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

data is a GeoJSON feature collection, feature, or geometry. The source ignores data for a tile that it hasn't asked for, or has since cancelled.

See mln_map_set_custom_geometry_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 geometry source.

Implementation

Future<CommandCompletion> setCustomGeometrySourceTileData(
  String sourceId,
  CanonicalTileId tileId,
  Object? data,
) => _command(
  (arena, completion) => raw.mln_map_set_custom_geometry_source_tile_data(
    _handle.raw,
    nativeStringView(sourceId, arena).value,
    _writeCanonicalTileId(tileId, arena).ref,
    _nativeJsonView(data, arena),
    completion,
    nativeDiagnostic,
  ),
);