polygonToMap function

Map<PolygonId, Polygon> polygonToMap(
  1. Iterable<Polygon> polygons
)

Implementation

Map<PolygonId, Polygon> polygonToMap(Iterable<Polygon> polygons) {
  return Map<PolygonId, Polygon>.fromEntries(
    polygons.map((Polygon polygon) {
      return MapEntry<PolygonId, Polygon>(
        polygon.polygonId,
        polygon.clone(),
      );
    }),
  );
}