public class Polyline extends Geometry
Geometry.GeometryType
Modifier and Type | Method and Description |
---|---|
Polyline |
addPath(Ring path)
Adds a path to the Polyline.
|
static Polyline |
create(com.google.gwt.core.client.JavaScriptObject json)
Creates a new Polyline object using a JSON object.
|
static Polyline |
create(SpatialReference sr)
Creates a new Polyline object.
|
Extent |
getExtent()
Returns the extent of the Polyline.
|
RingGroup |
getPaths()
An array of paths.
|
Point |
getPoint(int pathIndex,
int pointIndex)
Returns a point specified by a path and point in the path.
|
Polyline |
insertPoint(int pathIndex,
int pointIndex,
Point point)
Inserts a new point into a polyline.
|
com.google.gwt.core.client.JsArray<Point> |
removePath(int pathIndex)
Removes a path from the Polyline.
|
Point |
removePoint(int pathIndex,
int pointIndex)
Remove a point from the polyline at the given pointIndex within the path identified by the given pathIndex.
|
Polyline |
setPoint(int pathIndex,
int pointIndex,
Point point)
Updates a point in a polyline.
|
fromJson, geographicToWebMercator, getExtentForScale, getJson, getJsonType, getLength, getLineIntersection, getScale, getSpatialReference, getType, isClockwise, setSpatialReference, toJson, toMapGeometry, toMapPoint, toScreenGeometry, toScreenPoint, webMercatorToGeographic
public static Polyline create(SpatialReference sr)
sr
- - Spatial reference of the geometry.public static Polyline create(com.google.gwt.core.client.JavaScriptObject json)
json
- - JSON object representing the geometry.public final RingGroup getPaths()
public final Polyline addPath(Ring path)
path
- - An array of x,y coordinate pairs to create a path.public final Extent getExtent()
public final Point getPoint(int pathIndex, int pointIndex)
pathIndex
- - The index of a path in a polyline.pointIndex
- - The index of a point in a path.public final Polyline insertPoint(int pathIndex, int pointIndex, Point point)
pathIndex
- - Path index to insert point.pointIndex
- - The index of the inserted point in the path.point
- - Point to insert into the path.public final com.google.gwt.core.client.JsArray<Point> removePath(int pathIndex)
pathIndex
- - The index of a path to remove.public final Point removePoint(int pathIndex, int pointIndex)
pathIndex
- - The index of the path containing the point.pointIndex
- - The index of the point within the path.