The coordinate type this shape. This property is read only. An Error will be thrown when trying to assign to this property.
The number of points in the polyline
The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.
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).
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
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).
The x coordinate of the point for which containment must be checked
The y coordinate of the point for which containment must be checked
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).
The point for which containment must be checked.
true
when the given point is contained in this shape
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
The index of the point to be returned.
Moves the x and y coordinates of the point at the given index to the given coordinates. The z value remains unchanged.
The index of the point that must be removed.
x coordinate value
y coordinate value
Moves the point at the given index to the given coordinates.
The index of the point that must be removed.
x coordinate value
y coordinate value
z coordinate value
Removes a Point at a given position in this Polyline.
The index of the point that must be removed.
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.
x coordinate value
y coordinate value
z coordinate value, may be omitted.
Translates all the points of this Polyline over the given vector in 3D space.
x coordinate value
y coordinate value
z coordinate value
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.
The index of the point that must be removed.
x coordinate value
y coordinate value
z coordinate value, may be omitted.
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.