blob: ba4ce7d6f55fa079e4cbcaaf61c9db9a8365b8b4 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import '../types.dart';
import 'maps_object.dart';
/// Converts an [Iterable] of Polygons in a Map of PolygonId -> Polygon.
Map<PolygonId, Polygon> keyByPolygonId(Iterable<Polygon> polygons) {
return keyByMapsObjectId<Polygon>(polygons).cast<PolygonId, Polygon>();
}
/// Converts a Set of Polygons into something serializable in JSON.
Object serializePolygonSet(Set<Polygon> polygons) {
return serializeMapsObjectSet(polygons);
}