rotateSelectedElement

fun rotateSelectedElement(angle: Double, origin: Point? = null)

Rotates the GeometryEditor.selectedElement by the specified angle. The angle of rotation is used in the form of the modulo of 360 degrees; for example rotating by 540 degrees is equivalent to rotating the by 180 degrees. A positive value corresponds to a counterclockwise rotation.

If the origin com.arcgismaps.geometry.Point has a different com.arcgismaps.geometry.SpatialReference than the associated com.arcgismaps.mapping.view.MapView, the point will be reprojected before the geometry is rotated, using the default transformation.

If GeometryEditor.selectedElement is a GeometryEditorVertex, or a GeometryEditorGeometry of type com.arcgismaps.geometry.Point, and the origin parameter is null (or is at the same location as the selected element), then rotating the selected element has no effect.

Since

200.2.0

Parameters

angle

The angle by which to rotate the selected element, counterclockwise, in degrees.

origin

The center of rotation. If null, the center of the extent of the GeometryEditor.selectedElement is used.

See also

Throws

The GeometryEditor must be started and have a GeometryEditor.selectedElement set in order to rotate an element. GeometryEditorMidVertex elements cannot be rotated.