| Package | com.esri.ags.geometry |
| Class | public class Polyline |
| Inheritance | Polyline Geometry Object |
Default MXML Propertypaths
See also
| Property | Defined By | ||
|---|---|---|---|
| extent : Extent [override] [read-only]
The extent of this polyline. | Polyline | ||
| paths : Array
An array of paths. | Polyline | ||
![]() | spatialReference : SpatialReference
The spatial reference of the geometry. | Geometry | |
| type : String [override] [read-only]
The type of geometry is POLYLINE. | Polyline | ||
| Method | Defined By | ||
|---|---|---|---|
Polyline(paths:Array = null, spatialReference:SpatialReference = null)
Creates a new Polyline object. | Polyline | ||
addPath(points:Array):void
Adds a path to the polyline. | Polyline | ||
Returns a point specified by a path and point in the path. | Polyline | ||
insertPoint(pathIndex:int, pointIndex:int, point:MapPoint):void
Inserts a point into the polyline. | Polyline | ||
removePath(index:int):Array
Removes a path from the polyline. | Polyline | ||
removePoint(pathIndex:int, pointIndex:int):MapPoint
Removes a point from the polyline. | Polyline | ||
Sets(updates) an existing point in the polyline. | Polyline | ||
| extent | property |
extent:Extent [read-only] [override] The extent of this polyline.
public function get extent():Extent| paths | property |
paths:ArrayAn array of paths. Each path is made up of an array of two or more MapPoints.
public function get paths():Array public function set paths(value:Array):void| type | property |
type:String [read-only] [override] The type of geometry is POLYLINE.
public function get type():String| Polyline | () | Constructor |
public function Polyline(paths:Array = null, spatialReference:SpatialReference = null)Creates a new Polyline object.
Parameterspaths:Array (default = null) — Array of paths. Each path is an array of MapPoints.
| |
spatialReference:SpatialReference (default = null) — The spatial reference of the polyline.
|
| addPath | () | method |
public function addPath(points:Array):voidAdds a path to the polyline. When added the index of the path is incremented by one.
Parameters
points:Array — The array of MapPoints.
|
| getPoint | () | method |
public function getPoint(pathIndex:int, pointIndex:int):MapPointReturns a point specified by a path and point in the path.
Parameters
pathIndex:int — The index of a path in a polyline.
| |
pointIndex:int — The index of a point in a path.
|
MapPoint — A copy of the point at the specified index.
|
| insertPoint | () | method |
public function insertPoint(pathIndex:int, pointIndex:int, point:MapPoint):voidInserts a point into the polyline.
Parameters
pathIndex:int — The index of the path to insert point.
| |
pointIndex:int — The index of the inserted point.
| |
point:MapPoint — The point to be inserted.
|
| removePath | () | method |
public function removePath(index:int):ArrayRemoves a path from the polyline. The index specifies which path to remove.
Parameters
index:int — The index of the path to remove.
|
Array |
| removePoint | () | method |
public function removePoint(pathIndex:int, pointIndex:int):MapPointRemoves a point from the polyline.
Parameters
pathIndex:int — The index of the path to remove point.
| |
pointIndex:int — The index of the point to be removed.
|
MapPoint |
| setPoint | () | method |
public function setPoint(pathIndex:int, pointIndex:int, point:MapPoint):voidSets(updates) an existing point in the polyline.
Parameters
pathIndex:int — The index of the path to update point.
| |
pointIndex:int — The index of the updated point.
| |
point:MapPoint — The updated point.
|
<esri:Graphic>
<esri:Polyline spatialReference="{new SpatialReference(102100)}">
<fx:Array>
<fx:Array>
<esri:MapPoint x="15558700" y="1770100"/>
<esri:MapPoint x="12959100" y="2261100"/>
<esri:MapPoint x="11901900" y="3238400"/>
<esri:MapPoint x="1447100" y="4244300"/>
<esri:MapPoint x="-13627000" y="2012200"/>
<esri:MapPoint x="-13330400" y="1623400"/>
<esri:MapPoint x="-8733100" y="-24400"/>
<esri:MapPoint x="-7449500" y="1175400"/>
<esri:MapPoint x="-6681300" y="-4460100"/>
</fx:Array>
</fx:Array>
</esri:Polyline>
</esri:Graphic>