MapObjectCollection constructor

MapObjectCollection({
  1. required MapObjectId mapId,
  2. required List<MapObject> mapObjects,
  3. double zIndex = 0.0,
  4. TapCallback<MapObjectCollection>? onTap,
  5. bool consumeTapEvents = false,
  6. bool isVisible = true,
})

Implementation

MapObjectCollection({
  required this.mapId,
  required List<MapObject> mapObjects,
  this.zIndex = 0.0,
  this.onTap,
  this.consumeTapEvents = false,
  this.isVisible = true
}) : mapObjects = List.unmodifiable(mapObjects.groupFoldBy<MapObjectId, MapObject>(
    (element) => element.mapId,
    (previous, element) => element
  ).values);