# Location

Namespace: **Wisej.Hybrid.Shared.Geolocation**

Assembly: **Wisej.Hybrid** (3.5.0.0)

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

{% tabs %}
{% tab title="C#" %}

```csharp
public class Location
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class Location
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/CCV9PPenlC1YZvNh1I6R)Location()

Initializes a new instance of the [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) class.

### ![](/files/CCV9PPenlC1YZvNh1I6R)Location(latitude, longitude)

Initializes a new instance of the [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) class with the specified latitude and longitude.

| Name          | Type                                                          | Description                     |
| ------------- | ------------------------------------------------------------- | ------------------------------- |
| **latitude**  | [Double](https://docs.microsoft.com/dotnet/api/system.double) | Default latitude for location.  |
| **longitude** | [Double](https://docs.microsoft.com/dotnet/api/system.double) | Default longitude for location. |

### ![](/files/CCV9PPenlC1YZvNh1I6R)Location(latitude, longitude, timestamp)

Initializes a new instance of the [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) class with the specified latitude, longitude, and timestamp.

| Name          | Type                                                                          | Description                     |
| ------------- | ----------------------------------------------------------------------------- | ------------------------------- |
| **latitude**  | [Double](https://docs.microsoft.com/dotnet/api/system.double)                 | Default latitude for location.  |
| **longitude** | [Double](https://docs.microsoft.com/dotnet/api/system.double)                 | Default longitude for location. |
| **timestamp** | [DateTimeOffset](https://docs.microsoft.com/dotnet/api/system.datetimeoffset) | UTC timestamp for the location. |

### ![](/files/CCV9PPenlC1YZvNh1I6R)Location(latitude, longitude, altitude)

Initializes a new instance of the [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) class with the specified latitude, longitude, and altitude.

| Name          | Type                                                          | Description                     |
| ------------- | ------------------------------------------------------------- | ------------------------------- |
| **latitude**  | [Double](https://docs.microsoft.com/dotnet/api/system.double) | Default latitude for location.  |
| **longitude** | [Double](https://docs.microsoft.com/dotnet/api/system.double) | Default longitude for location. |
| **altitude**  | [Double](https://docs.microsoft.com/dotnet/api/system.double) | Default altitude for location.  |

### ![](/files/CCV9PPenlC1YZvNh1I6R)Location(point)

Initializes a new instance of the [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) class from an existing instance.

| Name      | Type                                                                               | Description                                                                                                               |
| --------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **point** | [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) | A [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) instance that will be used to clone. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception) Thrown if *point* is .

## Properties

### ![](/files/CCV9PPenlC1YZvNh1I6R)Accuracy

[Nullable\<Double>](https://docs.microsoft.com/dotnet/api/system.nullable-1): Gets or sets the horizontal accuracy (in meters) of the location.

### ![](/files/CCV9PPenlC1YZvNh1I6R)Altitude

[Nullable\<Double>](https://docs.microsoft.com/dotnet/api/system.nullable-1): Gets the altitude in meters (if available) in a reference system which is specified by [AltitudeReferenceSystem](#altitudereferencesystem).

Returns 0 or if not available.

### ![](/files/CCV9PPenlC1YZvNh1I6R)AltitudeReferenceSystem

[AltitudeReferenceSystem](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.altitudereferencesystem.md): Specifies the reference system in which the [Altitude](#altitude) value is expressed.

### ![](/files/CCV9PPenlC1YZvNh1I6R)Course

[Nullable\<Double>](https://docs.microsoft.com/dotnet/api/system.nullable-1): Gets or sets the current degrees relative to true north at the time when this location was determined.

Returns 0 or if not available.

### ![](/files/CCV9PPenlC1YZvNh1I6R)IsFromMockProvider

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets or sets whether this location originates from a mocked sensor and thus might not be the real location of the device.

### ![](/files/CCV9PPenlC1YZvNh1I6R)Latitude

[Double](https://docs.microsoft.com/dotnet/api/system.double): Gets or sets the latitude coordinate of this location.

### ![](/files/CCV9PPenlC1YZvNh1I6R)Longitude

[Double](https://docs.microsoft.com/dotnet/api/system.double): Gets or sets the longitude coordinate of this location.

### ![](/files/CCV9PPenlC1YZvNh1I6R)ReducedAccuracy

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets or sets whether this location has a reduced accuracy reading.

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

### ![](/files/CCV9PPenlC1YZvNh1I6R)Speed

[Nullable\<Double>](https://docs.microsoft.com/dotnet/api/system.nullable-1): 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](#accuracy) to be [High](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.geolocationaccuracy.md#fields) or better.

### ![](/files/CCV9PPenlC1YZvNh1I6R)Timestamp

[DateTimeOffset](https://docs.microsoft.com/dotnet/api/system.datetimeoffset): Gets or sets the timestamp of the location in UTC.

### ![](/files/CCV9PPenlC1YZvNh1I6R)VerticalAccuracy

[Nullable\<Double>](https://docs.microsoft.com/dotnet/api/system.nullable-1): Gets or sets the vertical accuracy (in meters) of the location.

## Methods

### ![](/files/kFkcPOa6hLWL1HRvZMvY)CalculateDistance(latitudeStart, longitudeStart, locationEnd, units)

Calculate distance between two locations.

| Parameter          | Type                                                                                         | Description                                        |
| ------------------ | -------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| **latitudeStart**  | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Latitude coordinate of the starting location.      |
| **longitudeStart** | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Longitude coordinate of the starting location.     |
| **locationEnd**    | [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md)           | The end location.                                  |
| **units**          | [DistanceUnits](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.distanceunits.md) | The unit in which the result distance is returned. |

**Returns:** [Double](https://docs.microsoft.com/dotnet/api/system.double). Distance between two locations in the unit selected.

### ![](/files/kFkcPOa6hLWL1HRvZMvY)CalculateDistance(locationStart, latitudeEnd, longitudeEnd, units)

Calculate distance between two locations.

| Parameter         | Type                                                                                         | Description                                        |
| ----------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| **locationStart** | [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md)           | The start location.                                |
| **latitudeEnd**   | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Latitude coordinate of the end location.           |
| **longitudeEnd**  | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Longitude coordinate of the end location.          |
| **units**         | [DistanceUnits](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.distanceunits.md) | The unit in which the result distance is returned. |

**Returns:** [Double](https://docs.microsoft.com/dotnet/api/system.double). Distance between two locations in the unit selected.

### ![](/files/kFkcPOa6hLWL1HRvZMvY)CalculateDistance(locationStart, locationEnd, units)

Calculate distance between two locations.

| Parameter         | Type                                                                                         | Description                                        |
| ----------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| **locationStart** | [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md)           | The start location.                                |
| **locationEnd**   | [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md)           | The end location.                                  |
| **units**         | [DistanceUnits](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.distanceunits.md) | The unit in which the result distance is returned. |

**Returns:** [Double](https://docs.microsoft.com/dotnet/api/system.double). Distance between two locations in the unit selected.

### ![](/files/kFkcPOa6hLWL1HRvZMvY)CalculateDistance(latitudeStart, longitudeStart, latitudeEnd, longitudeEnd, units)

Calculate distance between two [Location](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md) instances.

| Parameter          | Type                                                                                         | Description                                        |
| ------------------ | -------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| **latitudeStart**  | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Latitude coordinate of the starting location.      |
| **longitudeStart** | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Longitude coordinate of the starting location.     |
| **latitudeEnd**    | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Latitude coordinate of the end location.           |
| **longitudeEnd**   | [Double](https://docs.microsoft.com/dotnet/api/system.double)                                | Longitude coordinate of the end location.          |
| **units**          | [DistanceUnits](/hybrid/start/api/location/wisej.hybrid.shared.geolocation.distanceunits.md) | The unit in which the result distance is returned. |

**Returns:** [Double](https://docs.microsoft.com/dotnet/api/system.double). Distance between two locations in the unit selected.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/hybrid/start/api/location/wisej.hybrid.shared.geolocation.location.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
