Back to Devexpress

MapControl.EnableRotation Property

windowsforms-devexpress-dot-xtramap-dot-mapcontrol-8f47467f.md

latest4.1 KB
Original Source

MapControl.EnableRotation Property

Specifies whether the map can be rotated.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
[DefaultValue(true)]
public bool EnableRotation { get; set; }
vb
<DefaultValue(True)>
Public Property EnableRotation As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if the map can be rotated; otherwise, false.

|

Remarks

Hold down the right mouse button and move the mouse in a circle to rotate the map. Double-click the map with the right mouse button to reset the rotation angle.

The following code disables map rotation:

csharp
mapControl1.EnableRotation = false;
vb
mapControl1.EnableRotation = False

Use the Angle property or call the RotateAt(Double, CoordPoint) method to rotate the map programmatically.

The following code snippets (auto-collected from DevExpress Examples) contain references to the EnableRotation property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/WaypointMap/WaypointMapItemControlProvider.cs#L36

csharp
map.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
map.EnableRotation = false;
map.NavigationPanelOptions.Visible = false;

map-for-winforms-azure-routing/CS/Form1.cs#L49

csharp
mapControl.SetCenterPoint(new GeoPoint(40.714627, -74.002863), false);
    mapControl.EnableRotation = false;
}

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/WaypointMap/WaypointMapItemControlProvider.vb#L46

vb
map.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder
map.EnableRotation = False
map.NavigationPanelOptions.Visible = False

map-for-winforms-azure-routing/VB/Form1.vb#L43

vb
mapControl.SetCenterPoint(New GeoPoint(40.714627, -74.002863), False)
    mapControl.EnableRotation = False
End Sub

See Also

Angle

RotateAt(Double, CoordPoint)

Rotation

MapControl Class

MapControl Members

DevExpress.XtraMap Namespace