setZAndM static method

Geometry setZAndM({
  1. required Geometry geometry,
  2. required double z,
  3. required double m,
})

Return a copy of a geometry with the supplied z-coordinate and m-value.

If the given geometry already has z-coordinates or m-values, they are replaced in the resulting geometry by the supplied values. The resulting geometry has both Geometry.hasZ and Geometry.hasM values of true.

Supports true curves.

Parameters:

  • geometry — A geometry.
  • z — The z-coordinate.
  • m — The m-value.

Return Value: A copy of the given geometry with its z-coordinates and m-values set to the supplied values.