LineSegment.fromXY constructor

LineSegment.fromXY({
  1. required double xStart,
  2. required double yStart,
  3. required double xEnd,
  4. required double yEnd,
  5. SpatialReference? spatialReference,
})

Creates a line segment based on coordinates.

Use this method to create a line segment representing a straight line between two points.

Parameters:

  • xStart — The X coordinate of start point.
  • yStart — The Y coordinate of start point.
  • xEnd — The X coordinate of end point.
  • yEnd — The Y coordinate of end point.
  • spatialReference — A spatial reference.