Skip to main content

Location

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid (4.1.0.0)

Represents a physical location with the latitude, longitude, altitude and time information reported by the device.

public class Location

Constructors​

Instance member Location()​

Initializes a new instance of the Location class.

Instance member Location(latitude, longitude)​

Initializes a new instance of the Location class with the specified latitude and longitude.

NameTypeDescription
latitudeDoubleDefault latitude for location.
longitudeDoubleDefault longitude for location.

Instance member Location(latitude, longitude, timestamp)​

Initializes a new instance of the Location class with the specified latitude, longitude, and timestamp.

NameTypeDescription
latitudeDoubleDefault latitude for location.
longitudeDoubleDefault longitude for location.
timestampDateTimeOffsetUTC timestamp for the location.

Instance member Location(latitude, longitude, altitude)​

Initializes a new instance of the Location class with the specified latitude, longitude, and altitude.

NameTypeDescription
latitudeDoubleDefault latitude for location.
longitudeDoubleDefault longitude for location.
altitudeDoubleDefault altitude for location.

Instance member Location(point)​

Initializes a new instance of the Location class from an existing instance.

NameTypeDescription
pointLocationA Location instance that will be used to clone.

Throws:

Properties​

Instance member Accuracy​

Nullable<Double>: Gets or sets the horizontal accuracy (in meters) of the location.

Instance member Altitude​

Nullable<Double>: Gets the altitude in meters (if available) in a reference system which is specified by AltitudeReferenceSystem.

Returns 0 or null if not available.

Instance member AltitudeReferenceSystem​

AltitudeReferenceSystem: Specifies the reference system in which the Altitude value is expressed.

Instance member Course​

Nullable<Double>: Gets or sets the current degrees relative to true north at the time when this location was determined.

Returns 0 or null if not available.

Instance member IsFromMockProvider​

Boolean: Gets or sets whether this location originates from a mocked sensor and thus might not be the real location of the device.

Instance member Latitude​

Double: Gets or sets the latitude coordinate of this location.

Instance member Longitude​

Double: Gets or sets the longitude coordinate of this location.

Instance member ReducedAccuracy​

Boolean: Gets or sets whether this location has a reduced accuracy reading.

This functionality only applies to iOS. Other platforms will always report false.

Instance member Speed​

Nullable<Double>: Gets or sets the current speed in meters per second at the time when this location was determined.

Returns 0 or null if not available. Otherwise the value will range between 0-360.

Requires Accuracy to be High or better.

Instance member Timestamp​

DateTimeOffset: Gets or sets the timestamp of the location in UTC.

Instance member VerticalAccuracy​

Nullable<Double>: Gets or sets the vertical accuracy (in meters) of the location.

Methods​

Static member CalculateDistance(latitudeStart, longitudeStart, locationEnd, units)​

Calculate distance between two locations.

ParameterTypeDescription
latitudeStartDoubleLatitude coordinate of the starting location.
longitudeStartDoubleLongitude coordinate of the starting location.
locationEndLocationThe end location.
unitsDistanceUnitsThe unit in which the result distance is returned.

Returns: Double. Distance between two locations in the unit selected.

Static member CalculateDistance(locationStart, latitudeEnd, longitudeEnd, units)​

Calculate distance between two locations.

ParameterTypeDescription
locationStartLocationThe start location.
latitudeEndDoubleLatitude coordinate of the end location.
longitudeEndDoubleLongitude coordinate of the end location.
unitsDistanceUnitsThe unit in which the result distance is returned.

Returns: Double. Distance between two locations in the unit selected.

Static member CalculateDistance(locationStart, locationEnd, units)​

Calculate distance between two locations.

ParameterTypeDescription
locationStartLocationThe start location.
locationEndLocationThe end location.
unitsDistanceUnitsThe unit in which the result distance is returned.

Returns: Double. Distance between two locations in the unit selected.

Static member CalculateDistance(latitudeStart, longitudeStart, latitudeEnd, longitudeEnd, units)​

Calculate distance between two Location instances.

ParameterTypeDescription
latitudeStartDoubleLatitude coordinate of the starting location.
longitudeStartDoubleLongitude coordinate of the starting location.
latitudeEndDoubleLatitude coordinate of the end location.
longitudeEndDoubleLongitude coordinate of the end location.
unitsDistanceUnitsThe unit in which the result distance is returned.

Returns: Double. Distance between two locations in the unit selected.