copyWith method

  1. @override
GeoPoint2m copyWith({
  1. num? x,
  2. num? y,
  3. num? z,
  4. num? m,
})
override

Copies this point with the compatible type and sets given coordinates.

Optional x, y, z and m values, when given, override values of this point object. If the type of this point does not have a certain value, then it's ignored.

Properties have equality (in context of this library): lon == x, lat == y, elev == z

Implementation

@override
GeoPoint2m copyWith({num? x, num? y, num? z, num? m}) => GeoPoint2m(
      lon: (x ?? lon).toDouble(),
      lat: (y ?? lat).toDouble(),
      m: (m ?? this.m).toDouble(),
    );