setGeoJsonSourceSynchronousTiling method

Future<CommandCompletion> setGeoJsonSourceSynchronousTiling(
  1. String sourceId,
  2. bool enabled
)

Sets whether a GeoJSON source builds its tiles while the map renders.

Building tiles while the map renders, instead of in the background, makes new data show in the next frame. The setting replaces the synchronousUpdate member of the source's JSON, which defaults to false.

See mln_map_set_geo_json_source_synchronous_tiling 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 GeoJSON source.
  • Status.invalidState while the style isn't loaded, as MapHandle.setStyleUrl() describes.

Implementation

Future<CommandCompletion> setGeoJsonSourceSynchronousTiling(
  String sourceId,
  bool enabled,
) => _command(
  (arena, completion) => raw.mln_map_set_geo_json_source_synchronous_tiling(
    _handle.raw,
    nativeStringView(sourceId, arena).value,
    enabled,
    completion,
    nativeDiagnostic,
  ),
);