MultiLineString constructor

const MultiLineString(
  1. List<PositionSeries> lineStrings, {
  2. Box? bounds,
})

A multi line string with an array of lineStrings (each with a chain of positions).

An optional bounds can used set a minimum bounding box for a geometry.

Each line string or a chain of positions is represented by a PositionSeries instance.

Examples:

// a multi line string with two line strings both with three 2D positions
MultiLineString([
  [10.0, 20.0, 12.5, 22.5, 15.0, 25.0].positions(Coords.xy),
  [12.5, 23.0, 11.5, 24.0, 12.5, 24.0].positions(Coords.xy),
]);

// a multi line string with two line strings both with three 3D positions
MultiLineString([
  [10.0, 20.0, 30.0, 12.5, 22.5, 32.5, 15.0, 25.0, 35.0]
      .positions(Coords.xyz),
  [12.5, 23.0, 32.5, 11.5, 24.0, 31.5, 12.5, 24.0, 32.5]
      .positions(Coords.xyz),
]);

Implementation

const MultiLineString(List<PositionSeries> lineStrings, {super.bounds})
    : _lineStrings = lineStrings;