Units property
Returns or sets the unit of measurement used to measure distance; similar to clicking Options on the Tools menu. Default value is geoMiles in MapPoint North America and geoKm in MapPoint Europe. Read/write GeoUnits.
Note for the MapPoint Control: When called from the MapPoint Control, the Units property applies only to the unit of measurement for the Control, not MapPoint.
GeoUnits |
Value |
Description |
---|---|---|
geoKm |
1 |
Distances are measured in kilometers |
geoMiles |
0 |
Distances are measured in miles |
Applies to
Objects: Application, MappointControl
Syntax
object.Units
Properties
Part |
Description |
---|---|
Object |
Required. An expression that returns an Application or MappointControl object. |
Remarks
- The Units property affects all methods and properties in the MapPoint object model that use distance, unless otherwise specified.
Example
Sub ToggleUnits()
Dim objApp As MapPoint.Application
'Create the Application object
Set objApp = New MapPoint.Application
'Toggle the units
If objApp.Units = geoMiles Then
objApp.Units = geoKm
Else
objApp.Units = geoMiles
End If
End Sub