selectPart

fun selectPart(partIndex: Int)

Selects the part with the specified index. When a part of a polygon or polyline geometry is selected, a GeometryEditorPart is returned from GeometryEditor.selectedElement. If the polygon or polyline has only one com.arcgismaps.geometry.Part, then a GeometryEditorGeometry with a shape equivalent to the entire geometry is returned from GeometryEditor.selectedElement instead, which provides immediate access to the extent (com.arcgismaps.geometry.Geometry.extent) and can be directly used in other geometry operations. If the current GeometryEditor.geometry is a com.arcgismaps.geometry.Point or com.arcgismaps.geometry.Multipoint, the entire geometry is selected.

When a part of a com.arcgismaps.geometry.Polygon or com.arcgismaps.geometry.Polyline (com.arcgismaps.geometry.Multipart) geometry is selected it can be edited separately from the other parts of the geometry. For example, you can move only the selected part interactively by dragging, or call GeometryEditor.moveSelectedElement or GeometryEditor.moveSelectedElement to move only the selected part programmatically.

Since

200.1.0

Parameters

partIndex

The index of the part in the geometry editor's com.arcgismaps.geometry.Multipart geometry to be selected. Use a value of 0 for com.arcgismaps.geometry.Multipoint geometries.

See also

Throws

if the geometry editor is not started

if the given index is out of range for the current geometry