Class ISN_CLLocation
The latitude, longitude, and course information reported by the system.
Inheritance
Inherited Members
Namespace: SA.iOS.CoreLocation
Assembly: cs.temp.dll.dll
Syntax
public class ISN_CLLocation
Constructors
ISN_CLLocation(ISN_CLLocationCoordinate2D, Double, Double, Double, DateTime)
Creates a location object with the specified coordinate and altitude information.
Declaration
public ISN_CLLocation(ISN_CLLocationCoordinate2D coordinate, double altitude, double hAccuracy, double vAccuracy, DateTime timestamp)
Parameters
Type | Name | Description |
---|---|---|
ISN_CLLocationCoordinate2D | coordinate | A coordinate structure containing the latitude and longitude values. |
System.Double | altitude | The altitude value for the location. |
System.Double | hAccuracy | The radius of uncertainty for the geographical coordinate, measured in meters. Specify a negative number to indicate that the geographical coordinate is invalid. |
System.Double | vAccuracy | The accuracy of the altitude value, measured in meters. Specify a negative number to indicate that the altitude is invalid. |
DateTime | timestamp | he time to associate with the location object. Typically, you specify the current time. |
Properties
Altitude
The altitude, measured in meters. Positive values indicate altitudes above sea level. Negative values indicate altitudes below sea level.
Declaration
public double Altitude { get; }
Property Value
Type | Description |
---|---|
System.Double |
Coordinate
The geographical coordinate information. When running in the simulator, Core Location uses the values provided to it by the simulator. You must run your application on an iOS-based device to get the actual location of that device.
Declaration
public ISN_CLLocationCoordinate2D Coordinate { get; }
Property Value
Type | Description |
---|---|
ISN_CLLocationCoordinate2D |
Course
The direction in which the device is traveling, measured in degrees and relative to due north. Course values are measured in degrees starting at due north and continue clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is 180 degrees, and so on. Course values may not be available on all devices. A negative value indicates that the course information is invalid.
Declaration
public double Course { get; }
Property Value
Type | Description |
---|---|
System.Double |
Floor
The logical floor of the building in which the user is located. If floor information is not available for the current location, the value of this property is -1.
Declaration
public int Floor { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
HorizontalAccuracy
The radius of uncertainty for the location, measured in meters.
The location’s latitude and longitude identify the center of the circle, and this value indicates the radius of that circle. A negative value indicates that the latitude and longitude are invalid.
Declaration
public double HorizontalAccuracy { get; }
Property Value
Type | Description |
---|---|
System.Double |
Speed
The instantaneous speed of the device, measured in meters per second.
This value reflects the instantaneous speed of the device as it moves in the direction of its current heading. A negative value indicates an invalid speed. Because the actual speed can change many times between the delivery of location events, use this property for informational purposes only.
Declaration
public double Speed { get; }
Property Value
Type | Description |
---|---|
System.Double |
Timestamp
The time at which this location was determined.
Declaration
public DateTime Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTime |
VerticalAccuracy
The accuracy of the altitude value, measured in meters.
When this property contains 0 or a positive number, the value in the Altitude property is plus or minus the specified number of meters. When this property contains a negative number, the value in the Altitude property is invalid.
Determining the vertical accuracy requires a device with GPS capabilities. Thus, on some devices, this property always contains a negative value.
Declaration
public double VerticalAccuracy { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
DistanceFromLocation(ISN_CLLocation)
Returns the distance (measured in meters) from the current object's location to the specified location.
This method measures the distance between the location in the current object and the value in the location parameter. The distance is calculated by tracing a line between the two points that follows the curvature of the Earth, and measuring the length of the resulting arc. The arc is a smooth curve that does not take into account altitude changes between the two locations.
Declaration
public double DistanceFromLocation(ISN_CLLocation location)
Parameters
Type | Name | Description |
---|---|---|
ISN_CLLocation | location | The destination location. |
Returns
Type | Description |
---|---|
System.Double | The distance (in meters) between the two locations. |