addList method

Future<List<int>> addList({
  1. required List<MarkerWithRenderSettings> list,
  2. required MarkerCollectionRenderSettings settings,
  3. required String name,
  4. MarkerType markerType = MarkerType.point,
})

Add a large list of markers to the map efficiently.

Accepts a list of MarkerWithRenderSettings together with a single MarkerCollectionRenderSettings and a collection name. It is optimized for bulk insertion (useful when adding thousands of markers).

Parameters

Returns

Implementation

Future<List<int>> addList({
  required final List<MarkerWithRenderSettings> list,
  required final MarkerCollectionRenderSettings settings,
  required final String name,
  final MarkerType markerType = MarkerType.point,
}) async {
  final dynamic jsonResponse = await GemKitPlatform.instance.addList(
    object: this,
    list: list,
    settings: settings,
    name: name,
    parentMapId: _mapPointerId,
    markerType: markerType,
  );
  final Map<String, dynamic> parsedResponse = jsonDecode(jsonResponse);
  final List<int> resultList = List<int>.from(parsedResponse['result']);
  return resultList;
}