LuciadRIA (2026.1.02)
    Preparing search index...

    Class PolylineAbstract

    A polyline is defined by a number of ordered, connected Points. A polyline is always defined in a particular geographical reference (Geodetic reference or Grid Reference). A Polyline cannot be instantiated directly. It must be instantiated using createPolyline. Note: For polylines in a geodetic spatial reference, if any point's latitude is initially set outside the valid range of [-90, 90] degrees, it is automatically clamped to this range for accuracy.

    Hierarchy (View Summary)

    • get bounds(): Bounds | null

      The bounds of this shape. This property is to be treated in a read only manner. An error will be thrown when trying to assign to this property. Note that the bounds property is not immutable. Modifying properties of the bounds property may corrupt your data.

      Returns Bounds | null

    • get coordinateType(): CoordinateType

      The coordinate type this shape. This property is read only. An Error will be thrown when trying to assign to this property.

      Returns CoordinateType

    • get focusPoint(): Point | null

      The focus point of this shape. This property is read only. An error will be thrown when trying to assign to this property. This property contains an object but should be treated with value semantics: changes to the shape will not be reflected in the focusPoint that was retrieved from this Polygon before the modification.

      Returns Point | null

    • get pointCount(): number

      The number of points in the polyline

      Returns number

    • get reference(): CoordinateReference | null

      The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

      Returns CoordinateReference | null

    • Determines whether a given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

      Parameters

      • x: number | Point | Bounds

        The point for which containment must be checked. If a 3D point is passed to this function, it will be treated as a 2D point: the z coordinate (height) will be ignored. The reference of this point must be the same reference as this Shape

      • Optionaly: number

      Returns boolean

      true when the given point is contained in this shape

      Please use contains2DPoint instead.

    • Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

      Parameters

      • x: number

        The x coordinate of the point for which containment must be checked

      • y: number

        The y coordinate of the point for which containment must be checked

      Returns boolean

      true when the given point is contained in this shape

    • Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

      Parameters

      • point: Point

        The point for which containment must be checked.

      Returns boolean

      true when the given point is contained in this shape

      InvalidReferenceError when a point has another spatial reference

    • Indicates whether this shape is equal to another.

      Parameters

      Returns boolean

      true if both shapes are equal, false otherwise.

    • Returns the point of the polyline at the given index. Any subsequent mutation on the point affects the polyline shape. Note: A new Point is returned on each function invocation that shares the same point representation of the polyline.

      const pA = polyline.getPoint(0)
      const pB = polyline.getPoint(0)
      console.log(pA === pB) // false
      pA.x = 100;
      console.log(pA.x, pB.x, polyline.getPoint(0).x) // 100, 100, 100

      Parameters

      • index: number

        The index of the point to be returned.

      Returns Point

    • Inserts a Point at a given position in this Polyline. The point must be defined in the same spatial reference as the polygon, otherwise an exception will be thrown.

      Parameters

      • index: number

        The index at which the point must be inserted

      • point: Point

        The point to be inserted

      Returns void

      InvalidReferenceError When the point's spatial reference does not correspond with the polyline's spatial reference.

      ProgrammingError When the index is invalid, i.e. smaller than zero or larger than the amount of points in the polyline.

    • Moves the x and y coordinates of the point at the given index to the given coordinates. The z value remains unchanged.

      Parameters

      • index: number

        The index of the point that must be moved.

      • x: number

        x coordinate value

      • y: number

        y coordinate value

      Returns void

      ProgrammingError When the index is invalid (i.e. smaller than zero or larger than the index of the last point in the polyline.

    • Moves the point at the given index to the given coordinates.

      Parameters

      • index: number

        The index of the point that must be removed.

      • x: number

        x coordinate value

      • y: number

        y coordinate value

      • z: number

        z coordinate value

      Returns void

      ProgrammingError When the index is invalid (i.e. smaller than zero or larger than the index of the last point in the polyline.

    • Removes a Point at a given position in this Polyline.

      Parameters

      • index: number

        The index of the point that must be removed.

      Returns void

      ProgrammingError When the index is invalid, i.e. smaller than zero or larger than the index of the last point in the polyline.

    • Converts the shape to a string. This functionality is for debugging purposes only. Results of toString cannot be used to uniquely identify a shape instance.

      Returns string

    • Translates all the points of this Polyline over the given vector in 2D or 3D space. A point is only translated in 3D space if the z parameter is specified.

      Parameters

      • x: number

        x coordinate value

      • y: number

        y coordinate value

      • Optionalz: number

        z coordinate value, may be omitted.

      Returns void

    • Translates the shape over the given vector in 2D space.

      Parameters

      • x: number

        The x coordinate of the translation vector

      • y: number

        The y coordinate of the translation vector

      Returns void

    • Translates all the points of this Polyline over the given vector in 3D space.

      Parameters

      • x: number

        x coordinate value

      • y: number

        y coordinate value

      • z: number

        z coordinate value

      Returns void

    • Translates the point at the given index over the given vector in 2D or 3D space. A point is only translated in 3D space if the z parameter is specified.

      Parameters

      • index: number

        The index of the point that must be removed.

      • x: number

        x coordinate value

      • y: number

        y coordinate value

      • Optionalz: number

        z coordinate value, may be omitted.

      Returns void

      ProgrammingError When the index is invalid (i.e. smaller than zero or larger than the index of the last point in the polyline.