| Package | com.esri.ags.geometry |
| Class | public class Polyline |
| Inheritance | Polyline Geometry |
Default MXML Propertypaths
<esri:Graphic>
<esri:Polyline spatialReference="{new SpatialReference(4326)}">
<mx:Array>
<mx:Array>
<esri:MapPoint x="139.766" y="35.700"/>
<esri:MapPoint x="116.412" y="39.900"/>
<esri:MapPoint x="106.916" y="47.916"/>
<esri:MapPoint x="13" y="55.59"/>
<esri:MapPoint x="-122.414" y="37.784"/>
<esri:MapPoint x="-119.749" y="34.4289"/>
</mx:Array>
</mx:Array>
</esri:Polyline>
</esri:Graphic>See also
| Property | Defined by | ||
|---|---|---|---|
| extent : Extent
[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 [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 [added in version 1.3].
| Polyline | ||
|
insertPoint(pathIndex:int, pointIndex:int, point:MapPoint):void
Inserts a point into the polyline [added in version 1.3].
| Polyline | ||
|
removePath(index:int):Array
Removes a path from the polyline [added in version 1.3].
| Polyline | ||
|
removePoint(pathIndex:int, pointIndex:int):MapPoint
Removes a point from the polyline [added in version 1.3].
| Polyline | ||
|
Sets (updates) an existing point in the polyline [added in version 1.3].
| Polyline | ||
| extent | property |
extent:Extent [read-only]The extent of this polyline.
Implementation public function get extent():Extent
| paths | property |
paths:Array [read-write]An array of paths. Each path is made up of an array of two or more MapPoints.
Implementation public function get paths():Array
public function set paths(value:Array):void
| type | property |
type:String [read-only]The type of geometry is POLYLINE.
Implementation 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. A 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.
Parameterspoints:Array — The array of MapPoints.
|
| getPoint | () | method |
public function getPoint(pathIndex:Number, pointIndex:Number):MapPointReturns a point specified by a path and point in the path [added in version 1.3].
ParameterspathIndex:Number — The index of a path in a polyline.
|
|
pointIndex:Number — 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 [added in version 1.3].
ParameterspathIndex: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 [added in version 1.3]. The index specifies which path to remove.
Parametersindex:int — The index of the path to remove.
|
Array |
| removePoint | () | method |
public function removePoint(pathIndex:int, pointIndex:int):MapPointRemoves a point from the polyline [added in version 1.3].
ParameterspathIndex: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 [added in version 1.3].
ParameterspathIndex:int — The index of the path to update point.
|
|
pointIndex:int — The index of the updated point.
|
|
point:MapPoint — The updated point.
|