keyByPolygonId function

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

Converts an Iterable of Polygons in a Map of PolygonId -> Polygon.

Implementation

Map<PolygonId, Polygon> keyByPolygonId(Iterable<Polygon> polygons) {
  return keyByMapsObjectId<Polygon>(polygons).cast<PolygonId, Polygon>();
}