MapControl.Measurements Property
Returns the MapControl Measurements object.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
Measurements | Contains measurement API to use map rulers. |
Remarks
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) });
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. | |
Creates a ruler of the specified type to measure the distance or area between coordinate points passed as the second parameter. |