setGeoJsonSourceUrl method

Future<CommandCompletion> setGeoJsonSourceUrl(
  1. String sourceId,
  2. String url
)

Makes a GeoJSON source load its data from url.

See mln_map_set_geo_json_source_url 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> setGeoJsonSourceUrl(String sourceId, String url) =>
    _command(
      (arena, completion) => raw.mln_map_set_geo_json_source_url(
        _handle.raw,
        nativeStringView(sourceId, arena).value,
        nativeStringView(url, arena).value,
        completion,
        nativeDiagnostic,
      ),
    );