Line, Polygon, Polyline, Freehand, Ellipse, Rectangle, Stamp, FreeText annotations show a rotation control when selected. This control handle lets the user rotate the annotation with a full range (360 degrees).
Rotating annotations programmatically
To rotate annotations programmatically, supported annotations have a rotate function that takes an angle to rotate by:
Using the setRotationOptions API, then you can disable rotation completely. If you would like to disable free form rotation on certain annotations, then the following can be used instead: