Skip to main content

Location

Namespace: Wisej.Hybrid.Shared.Geolocation

Assembly: Wisej.Hybrid

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

public class Location

Constructors

Instance memberLocation()

Initializes a new instance of the Location class.

Instance memberLocation(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 memberLocation(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 memberLocation(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 memberLocation(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 memberAccuracy

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

Instance memberAltitude

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

Returns 0 or if not available.

Instance memberAltitudeReferenceSystem

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

Instance memberCourse

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

Returns 0 or if not available.

Instance memberIsFromMockProvider

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

Instance memberLatitude

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

Instance memberLongitude

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

Instance memberReducedAccuracy

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 memberSpeed

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

Returns 0 or if not available. Otherwise the value will range between 0-360. Requires Accuracy to be High or better.

Instance memberTimestamp

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

Instance memberVerticalAccuracy

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

Methods

Static memberCalculateDistance(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 memberCalculateDistance(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 memberCalculateDistance(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 memberCalculateDistance(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.