windowsforms-devexpress-dot-xtramap-dot-mapcontrol-4fcc734e.md
Returns the MapControl Measurements object.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public Measurements Measurements { get; }
Public ReadOnly Property Measurements As Measurements
| Type | Description |
|---|---|
| Measurements |
Contains measurement API to use map rulers.
|
The following example specifies Measurements settings in code:
mapControl1.Measurements.ShowToolbar = true;
mapControl1.Measurements.ToolbarOptions.ShowAreaButton = false;
mapControl1.Measurements.ToolbarOptions.ShowDistanceButton = true;
mapControl1.Measurements.ToolbarOptions.ButtonSize = new Size(30, 30);
MapRuler ruler = mapControl1.Measurements.CreateRuler( RulerType.Distance,
new List<CoordPoint>() {
new GeoPoint(48.864716, 2.349014),
new GeoPoint(45.46427, 9.18951),
new GeoPoint(48.20849, 16.37208) });
mapControl1.Measurements.ShowToolbar = True
mapControl1.Measurements.ToolbarOptions.ShowAreaButton = False
mapControl1.Measurements.ToolbarOptions.ShowDistanceButton = True
mapControl1.Measurements.ToolbarOptions.ButtonSize = New Size(30, 30)
Dim ruler As MapRuler = mapControl1.Measurements.CreateRuler(RulerType.Distance,
New List(Of CoordPoint)() From {
New GeoPoint(48.864716, 2.349014),
New GeoPoint(45.46427, 9.18951),
New GeoPoint(48.20849, 16.37208)})
The image below displays the result:
Related API Members:
|
Member
|
Description
| | --- | --- | |
|
Contains API to manage rulers that help users measure distances and areas on a map.
| |
|
Specifies whether the Measurements toolbar is displayed.
| |
|
Specifies whether the Add Area Ruler button is displayed in the Measurements toolbar.
| |
|
Specifies whether the Add Distance Ruler button is displayed in the Measurements toolbar.
| |
|
Sets the size of buttons in the Measurements toolbar.
| |
CreateRuler(RulerType, IList<CoordPoint>)
|
Creates a ruler of the specified type to measure the distance or area between coordinate points passed as the second parameter.
|
See Also