C# Class WebApplications.Utilities.Location.LatLng

Stores the Latitude/Longitude of a point.
Afficher le fichier Open project: webappsuk/CoreLibraries Class Usage Examples

Méthodes publiques

Свойство Type Description
Latitude double
Longitude double

Méthodes publiques

Méthode Description
Distance ( LatLng pointOne, LatLng pointTwo, DistanceCalculation calculation = DistanceCalculation.LawOfCosines ) : double

Calculates the distance (in km) between two specified latlong points. By default this uses the Law of Cosines formula (http://en.wikipedia.org/wiki/Law_of_cosines).

DistanceTo ( LatLng otherPoint, DistanceCalculation calculation = DistanceCalculation.LawOfCosines ) : double

Calculates the distance (in km) between the current point and the point specified. By default this uses the Law of Cosines formula (http://en.wikipedia.org/wiki/Law_of_cosines).

LatLng ( double latitude, double longitude ) : System

Initialises a new instance of the LatLng class.

MidPoint ( LatLng pointOne, LatLng pointTwo ) : LatLng

Calculates the midpoint between two specified latlong points.

MidpointTo ( LatLng otherPoint ) : LatLng

Calculates the midpoint between the current point and the point specified.

ToString ( ) : string

Returns a string that represents this instance.

Method Details

Distance() public static méthode

Calculates the distance (in km) between two specified latlong points. By default this uses the Law of Cosines formula (http://en.wikipedia.org/wiki/Law_of_cosines).
/// The specified is outside the allowable values. ///
public static Distance ( LatLng pointOne, LatLng pointTwo, DistanceCalculation calculation = DistanceCalculation.LawOfCosines ) : double
pointOne LatLng The first point to use in the calculation.
pointTwo LatLng The second point to use in the calculation.
calculation DistanceCalculation /// The calculation to use. /// By default this uses the Law of Cosines formula. ///
Résultat double

DistanceTo() public méthode

Calculates the distance (in km) between the current point and the point specified. By default this uses the Law of Cosines formula (http://en.wikipedia.org/wiki/Law_of_cosines).
/// The specified is outside the allowable values. ///
public DistanceTo ( LatLng otherPoint, DistanceCalculation calculation = DistanceCalculation.LawOfCosines ) : double
otherPoint LatLng The point we want to calculate the distance to.
calculation DistanceCalculation /// The distance calculation to use. /// By default this uses the Law of Cosines formula. ///
Résultat double

LatLng() public méthode

Initialises a new instance of the LatLng class.
public LatLng ( double latitude, double longitude ) : System
latitude double The Latitude of the point.
longitude double The Longitude of the point.
Résultat System

MidPoint() public static méthode

Calculates the midpoint between two specified latlong points.
public static MidPoint ( LatLng pointOne, LatLng pointTwo ) : LatLng
pointOne LatLng The first point to use in the calculation.
pointTwo LatLng The second point to use in the calculation.
Résultat LatLng

MidpointTo() public méthode

Calculates the midpoint between the current point and the point specified.
public MidpointTo ( LatLng otherPoint ) : LatLng
otherPoint LatLng The other point to use in the calculation.
Résultat LatLng

ToString() public méthode

Returns a string that represents this instance.
public ToString ( ) : string
Résultat string

Property Details

Latitude public_oe property

The Latitude of the point.
public double Latitude
Résultat double

Longitude public_oe property

The Longitude of the point.
public double Longitude
Résultat double