Skip to main content
All docs
V23.2

MapControl.Measurements Property

Returns the MapControl Measurements object.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v23.2.dll

NuGet Package: DevExpress.Win.Map

Declaration

public Measurements Measurements { get; }

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:

Map Control Measurements

Related API Members:

Member

Description

Measurements

Contains API to manage rulers that help users measure distances and areas on a map.

ShowToolbar

Specifies whether the Measurements toolbar is displayed.

ShowAreaButton

Specifies whether the Add Area Ruler button is displayed in the Measurements toolbar.

ShowDistanceButton

Specifies whether the Add Distance Ruler button is displayed in the Measurements toolbar.

ButtonSize

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