polygonToMap function
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(),
);
}),
);
}