map method

GeometryCollection<E> map(
  1. E toGeometry(
    1. E geometry
    )
)

Returns a new geometry collection with all geometries mapped using toGeometry.

If bounds object is available on this, then it's not recalculated and the returned object has it set null.

Implementation

GeometryCollection<E> map(E Function(E geometry) toGeometry) {
  final mapped = geometries.map<E>(toGeometry).toList(growable: false);
  final type = resolveCoordTypeFrom(collection: mapped);

  return GeometryCollection<E>._(mapped, type);
}