createPointAlong static method

ArcGISPoint createPointAlong(
  1. {required Polyline polyline,
  2. required double distance}
)

Return the point at the given distance along the line.

If distance is less than or equal to zero, the point returned is coincident with the start of the line. If distance is greater than or equal to the line's length, the point returned is coincident with the end of the line. If the line has multiple parts, and the distance falls exactly on a boundary between two parts, the returned point will be coincident with either the end of one part or the start of the next, but which one is undetermined.

Supports true curves.

Parameters:

  • polyline — The polyline from which the point is created.
  • distance — The distance along the polyline where the point is created, using the units of the polyline.

Return Value: The point at the given distance along the line.

Implementation

static ArcGISPoint createPointAlong(
    {required Polyline polyline, required double distance}) {
  _initializeArcGISEnvironmentIfNeeded();
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeometryEngine_createPointAlong(
        polyline._handle, distance, errorHandler);
  });
  return ArcGISPoint._fromHandle(objectHandle)!;
}