Skip to main content

UnitSystem

Namespace: Wisej.Web.Ext.GoogleMaps

Assembly: Wisej.Web.Ext.GoogleMaps (4.1.0.0)

Specifies what unit system to use when displaying results.

public enum UnitSystem

By default, directions are calculated and displayed using the unit system of the origin's country or region. (Note: Origins expressed using latitude/longitude coordinates rather than addresses always default to metric units.) For example, a route from "Chicago, IL" to "Toronto, ONT" will display results in miles, while the reverse route will display results in kilometers. You can override this unit system by setting one explicitly. Note: This unit system setting only affects the text displayed to the user. The directions result also contains distance values, not shown to the user, which are always expressed in meters.

Fields​

NameDescriptionValue
DefaultDirections are calculated and displayed using the unit system of the origin's country or region.
ImperialSpecifies usage of the Imperial (English) system. Distances are shown using miles.
MetricSpecifies usage of the metric system. Distances are shown using kilometers.

Used By​

NameDescription
GoogleMap.AddRouteUses the Google Maps DirectionsService to route and display a path between the origin and destination. See directions.