Class SketchVertex
- java.lang.Object
-
- com.esri.arcgisruntime.mapping.view.SketchVertex
-
public final class SketchVertex extends Object
Represents a point location (in map coordinates) and position (in the collections of parts, vertices and mid-vertices) of the sketch editor.If the point index is greater or equal to 0, then it's a vertex. If the insertion index is greater or equal to 0, then it's a mid-vertex. This object cannot have both point index and insertion index greater or equal to 0. Mid-vertices are not allowed for both a single point and a multi-point geometry.
- Since:
- 100.3.0
- See Also:
SketchEditor.setSelectedVertex(SketchVertex)
,SketchEditor.getSelectedVertex()
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SketchVertex
createMidVertex(int partIndex, int insertionIndex)
Creates a SketchVertex with a part index and an insertion index, which will represent a mid-vertex.static SketchVertex
createVertex(int partIndex, int pointIndex)
Creates a SketchVertex with a part index and a point index.boolean
equals(Object obj)
int
getInsertionIndex()
Gets the index position of the sketch vertex in the insertion collection for the multipart geometry (e.g.int
getPartIndex()
Gets the index of the part in the sketch editor's geometry at which this vertex can be found.Point
getPoint()
Gets the location of the sketch vertex in map coordinates.int
getPointIndex()
Gets the index position of the sketch vertex in the point collection for the multipart geometry (e.g.int
hashCode()
-
-
-
Method Detail
-
createVertex
public static SketchVertex createVertex(int partIndex, int pointIndex)
Creates a SketchVertex with a part index and a point index.- Parameters:
partIndex
- a geometry part indexpointIndex
- a point index in a geometry part- Returns:
- a SketchVertex that represents an actual vertex (as opposed to mid-vertex)
- Throws:
IllegalArgumentException
- if partIndex or pointIndex is negative- Since:
- 100.3.0
-
createMidVertex
public static SketchVertex createMidVertex(int partIndex, int insertionIndex)
Creates a SketchVertex with a part index and an insertion index, which will represent a mid-vertex.- Parameters:
partIndex
- a geometry part indexinsertionIndex
- an insertion index in a geometry part- Returns:
- a SketchVertex that represents a mid-vertex
- Throws:
IllegalArgumentException
- if partIndex or insertionIndex is negative- Since:
- 100.3.0
-
getPointIndex
public int getPointIndex()
Gets the index position of the sketch vertex in the point collection for the multipart geometry (e.g. multiple points, polyline, polygon).A point index value of -1 with an insertion index value >= 0, indicates that vertex has not yet been committed to the multipart geometry (i.e. mid-vertex). A point index value >=0 with an insertion index value of -1, indicates that vertex has been committed to the multipart geometry (i.e. actual vertex).
- Returns:
- the index position of the sketch vertex in the point collection
- Since:
- 100.3.0
-
getInsertionIndex
public int getInsertionIndex()
Gets the index position of the sketch vertex in the insertion collection for the multipart geometry (e.g. multiple points, polyline, polygon).A point index value of -1 with an insertion index value >= 0, indicates that vertex has not yet been committed to the multipart geometry (i.e. mid-vertex). A point index value >=0 with an insertion index value of -1, indicates that vertex has been committed to the multipart geometry (i.e. actual vertex).
- Returns:
- the index position of the sketch vertex in the insertion collection
- Since:
- 100.3.0
-
getPartIndex
public int getPartIndex()
Gets the index of the part in the sketch editor's geometry at which this vertex can be found.- Returns:
- the index of the part the vertex is associated with
- Since:
- 100.3.0
-
getPoint
public Point getPoint()
Gets the location of the sketch vertex in map coordinates. The property is returned as null until the vertex is bound to the sketch editor via selection.- Returns:
- the Point of the sketch vertex in map coordinates
- Since:
- 100.3.0
-
-