getCollectionAt method

MarkerCollection? getCollectionAt(
  1. int index
)

Retrieve the MarkerCollection at index.

Parameters

  • index: Zero-based index of the collection to retrieve.

Returns

  • A MarkerCollection instance for the requested index if the index is valid, otherwise null.

Implementation

MarkerCollection? getCollectionAt(final int index) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'MapViewMarkerCollections',
    'getCollectionAt',
    args: index,
    dependencyId: _mapPointerId,
  );

  final int result = resultString['result'];
  if (result == -1) {
    return null;
  }
  return MarkerCollection.init(result, _mapId);
}