multiLineString method
void
multiLineString(
- Iterable<
PositionSeries> lineStrings, { - String? name,
- Box? bounds,
override
Writes a multi line string with an array of lineStrings
(each with a
chain of positions).
Use an optional name
to specify a name for a geometry (when applicable).
An optional bounds
can used set a minimum bounding box for a geometry
written. A writer implementation may use it or ignore it.
An example to write a multi line string with two line strings:
content.multiLineString(
// an array of chains (one chain for each line string)
[
// a chain as a flat structure with four (x, y) points
[
10.1, 10.1,
5.0, 9.0,
12.0, 4.0,
10.1, 10.1,
].positions(Coords.xy),
// a chain as a flat structure with three (x, y) points
[
-1.1, -1.1,
2.1, -2.5,
3.5, -3.49,
].positions(Coords.xy),
],
);
Implementation
@override
void multiLineString(
Iterable<PositionSeries> lineStrings, {
String? name,
Box? bounds,
}) {
_add(
MultiLineString(
lineStrings is List<PositionSeries>
? lineStrings
: lineStrings.toList(growable: false),
bounds: bounds,
),
name: name,
);
}