Struct Distance
Distance between to positions
Inherited Members
Namespace: Mapsui.UI.Maui
Assembly: Mapsui.UI.Maui.dll
Syntax
public struct Distance
  Constructors
| Edit this page View SourceDistance(double)
Constructor for Mapsui.UI.Forms.Distance object.
Declaration
public Distance(double meters)
  Parameters
| Type | Name | Description | 
|---|---|---|
| double | meters | Meters.  | 
      
Properties
| Edit this page View SourceKilometers
Distance in kilometers
Declaration
public double Kilometers { get; }
  Property Value
| Type | Description | 
|---|---|
| double | Distance in kilometers  | 
      
Meters
Distance in meters
Declaration
public readonly double Meters { get; }
  Property Value
| Type | Description | 
|---|---|
| double | Distance in meters  | 
      
Miles
Distance in miles
Declaration
public double Miles { get; }
  Property Value
| Type | Description | 
|---|---|
| double | Distance im miles  | 
      
NauticalMiles
Distance in nautic miles
Declaration
public double NauticalMiles { get; }
  Property Value
| Type | Description | 
|---|---|
| double | Distance in nautical miles  | 
      
Methods
| Edit this page View SourceEquals(Distance)
Determines whether the specified Distance is equal to the current Mapsui.UI.Forms.Distance.
Declaration
public bool Equals(Distance other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Distance | other | The Distance to compare with the current Mapsui.UI.Forms.Distance  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | The object to compare with the current instance.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | true if   | 
      
Overrides
| Edit this page View SourceFromKilometers(double)
Create distance object for distance in kilometers
Declaration
public static Distance FromKilometers(double kilometers)
  Parameters
| Type | Name | Description | 
|---|---|---|
| double | kilometers | Distance in kilometers  | 
      
Returns
| Type | Description | 
|---|---|
| Distance | Distance object  | 
      
FromMeters(double)
Create distance object for distance in meters
Declaration
public static Distance FromMeters(double meters)
  Parameters
| Type | Name | Description | 
|---|---|---|
| double | meters | Distance in meters  | 
      
Returns
| Type | Description | 
|---|---|
| Distance | Distance object  | 
      
FromMiles(double)
Create distance object for distance in miles
Declaration
public static Distance FromMiles(double miles)
  Parameters
| Type | Name | Description | 
|---|---|---|
| double | miles | Distance in miles  | 
      
Returns
| Type | Description | 
|---|---|
| Distance | Distance object  | 
      
FromNauticalMiles(double)
Create distance object for distance in nautic miles
Declaration
public static Distance FromNauticalMiles(double nauticMiles)
  Parameters
| Type | Name | Description | 
|---|---|---|
| double | nauticMiles | Distance in nautic miles  | 
      
Returns
| Type | Description | 
|---|---|
| Distance | Distance object  | 
      
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance.  | 
      
Overrides
Operators
| Edit this page View Sourceoperator ==(Distance, Distance)
Declaration
public static bool operator ==(Distance left, Distance right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Distance | left | |
| Distance | right | 
Returns
| Type | Description | 
|---|---|
| bool | 
operator !=(Distance, Distance)
Declaration
public static bool operator !=(Distance left, Distance right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Distance | left | |
| Distance | right | 
Returns
| Type | Description | 
|---|---|
| bool |