project method

  1. @override
MultiPoint project(
  1. Projection projection
)
override

Returns an object of the same subtype as this with all position data projected using projection and non-positional properties left intact.

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

Examples:

// just project, the returned object has not bounds populated
someBoundedObject.project(someProjection);

// project and populate, the returned object has bounds populated
someBoundedObject.project(someProjection).populated(onBounds: true);

Implementation

@override
MultiPoint project(Projection projection) {
  final projected =
      positions.map((pos) => pos.project(projection)).toList(growable: false);

  return MultiPoint(projected);
}