add method

void add(
  1. Key key,
  2. T item,
  3. LatLngBounds bounds
)

Adds or updates an item in the index.

Implementation

void add(Key key, T item, LatLngBounds bounds) {
  // If it exists, remove it first (to clear old buckets)
  if (_items.containsKey(key)) {
    remove(key);
  }
  _addInternal(key, item, bounds);
}