All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

MapControl.Measurements Property

Gets or sets the MapControl Measurements object.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v20.2.dll

Declaration

public Measurements Measurements { get; set; }
Public Property Measurements As Measurements

Property Value

Type Description
Measurements

Contains measurement API to use map rulers.

Remarks

The following example adds the Measurements object to the Map Control and creates a distance ruler:

<dxm:MapControl x:Name="mapControl1">
  <dxm:MapControl.Measurements>
    <dxm:Measurements>
      <dxm:Measurements.ToolbarOptions>
        <dxm:MeasurementToolbarOptions ShowAreaButton="False"/>
      </dxm:Measurements.ToolbarOptions>
      </dxm:Measurements>
  </dxm:MapControl.Measurements>
...
</dxm:MapControl>
MapRuler ruler = mapControl1.Measurements.CreateRuler(RulerType.Distance, 
                                                       new List<CoordPoint>() {
                                                           new GeoPoint(48.864716, 2.349014), // Paris
                                                           new GeoPoint(45.46427, 9.18951),   // Milan
                                                           new GeoPoint(48.20849, 16.37208)   // Vienna
                                                       });
double distance = ruler.Measurement;

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.

ShowAreaButton

Specifies whether the Add Area Ruler button is displayed 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