ערוך

שתף באמצעות


GeoCoordinate Constructors

Definition

Initializes a new instance of GeoCoordinate.

Overloads

GeoCoordinate()

Initializes a new instance of GeoCoordinate that has no data fields set.

GeoCoordinate(Double, Double)

Initializes a new instance of the GeoCoordinate class from latitude and longitude data.

GeoCoordinate(Double, Double, Double)

Initializes a new instance of the GeoCoordinate class from latitude, longitude, and altitude data.

GeoCoordinate(Double, Double, Double, Double, Double, Double, Double)

Initializes a new instance of the GeoCoordinate class from latitude, longitude, altitude, horizontal accuracy, vertical accuracy, speed, and course.

GeoCoordinate()

Initializes a new instance of GeoCoordinate that has no data fields set.

public:
 GeoCoordinate();
public GeoCoordinate ();
Public Sub New ()

Remarks

All data fields are set to NaN. The new instance of GeoCoordinate is equivalent to Unknown.

This constructor should be used for serialization.

Applies to

GeoCoordinate(Double, Double)

Initializes a new instance of the GeoCoordinate class from latitude and longitude data.

public:
 GeoCoordinate(double latitude, double longitude);
public GeoCoordinate (double latitude, double longitude);
new System.Device.Location.GeoCoordinate : double * double -> System.Device.Location.GeoCoordinate
Public Sub New (latitude As Double, longitude As Double)

Parameters

latitude
Double

The latitude of the location. May range from -90.0 to 90.0.

longitude
Double

The longitude of the location. May range from -180.0 to 180.0.

Exceptions

Latitude or longitude is out of range.

Remarks

The latitude and longitude values must correspond to an actual location on the globe.

Applies to

GeoCoordinate(Double, Double, Double)

Initializes a new instance of the GeoCoordinate class from latitude, longitude, and altitude data.

public:
 GeoCoordinate(double latitude, double longitude, double altitude);
public GeoCoordinate (double latitude, double longitude, double altitude);
new System.Device.Location.GeoCoordinate : double * double * double -> System.Device.Location.GeoCoordinate
Public Sub New (latitude As Double, longitude As Double, altitude As Double)

Parameters

latitude
Double

Latitude. May range from -90.0 to 90.0.

longitude
Double

Longitude. May range from -180.0 to 180.0

altitude
Double

The altitude in meters. May be negative, 0, positive, or NaN, if unknown.

Exceptions

latitude, longitude, or altitude is out of range.

Remarks

The latitude and longitude values must correspond to an actual location on the globe.

Applies to

GeoCoordinate(Double, Double, Double, Double, Double, Double, Double)

Initializes a new instance of the GeoCoordinate class from latitude, longitude, altitude, horizontal accuracy, vertical accuracy, speed, and course.

public:
 GeoCoordinate(double latitude, double longitude, double altitude, double horizontalAccuracy, double verticalAccuracy, double speed, double course);
public GeoCoordinate (double latitude, double longitude, double altitude, double horizontalAccuracy, double verticalAccuracy, double speed, double course);
new System.Device.Location.GeoCoordinate : double * double * double * double * double * double * double -> System.Device.Location.GeoCoordinate
Public Sub New (latitude As Double, longitude As Double, altitude As Double, horizontalAccuracy As Double, verticalAccuracy As Double, speed As Double, course As Double)

Parameters

latitude
Double

The latitude of the location. May range from -90.0 to 90.0.

longitude
Double

The longitude of the location. May range from -180.0 to 180.0.

altitude
Double

The altitude in meters. May be negative, 0, positive, or NaN, if unknown.

horizontalAccuracy
Double

The accuracy of the latitude and longitude coordinates, in meters. Must be greater than or equal to 0. If a value of 0 is supplied to this constructor, the HorizontalAccuracy property will be set to NaN.

verticalAccuracy
Double

The accuracy of the altitude, in meters. Must be greater than or equal to 0. If a value of 0 is supplied to this constructor, the VerticalAccuracy property will be set to NaN.

speed
Double

The speed measured in meters per second. May be negative, 0, positive, or NaN, if unknown. A negative speed can indicate moving in reverse.

course
Double

The direction of travel, rather than orientation. This parameter is measured in degrees relative to true north. Must range from 0 to 360.0, or be NaN.

Exceptions

latitude, longitude, horizontalAccuracy, verticalAccuracy, or course is out of range.

Applies to