---
description: Wisej.Hybrid.DeviceGeolocation
---

# DeviceGeolocation

Namespace: **Wisej.Hybrid**

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

Provides methods to fetch the user's location.

{% tabs %}
{% tab title="C#" %}
```csharp
public class DeviceGeolocation
```
{% endtab %}

{% tab title="VB.NET" %}
```visual-basic
Public Class DeviceGeolocation
```
{% endtab %}
{% endtabs %}

Access this class through the [Device](../general/wisej.hybrid.device) singleton.

## Constructors

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)DeviceGeolocation()

Initializes a new instance of [DeviceGeolocation](wisej.hybrid.devicegeolocation).

## Methods

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetLastKnownLocation()

Gets the device's last known location.

**Returns:** [Location](wisej.hybrid.shared.geolocation.location). The last known location.

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetLocation(request)

Gets the device's location.

| Parameter                                                                                                                                                                                                                 | Type                                                                     | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----------- |
| **request** ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-723b640963c6cd781ff8c5ce5b24149fa0af7b9c%2Fbadge-optional.svg?alt=media) | [GeolocationRequest](wisej.hybrid.shared.geolocation.geolocationrequest) |             |

**Returns:** [Location](wisej.hybrid.shared.geolocation.location). The device's location.

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetPlacemarks(lat, lon)

Retrieve potential placemarks for a given location specified by coordinates.

| Parameter | Type                                                          | Description                                       |
| --------- | ------------------------------------------------------------- | ------------------------------------------------- |
| **lat**   | [Double](https://docs.microsoft.com/dotnet/api/system.double) | The latitude coordinate to find placemarks near.  |
| **lon**   | [Double](https://docs.microsoft.com/dotnet/api/system.double) | The longitude coordinate to find placemarks near. |

**Returns:** [Placemark\[\]](wisej.hybrid.shared.geolocation.placemark). List of [Placemark](wisej.hybrid.shared.geolocation.placemark) that best match the coordinates or if no placemarks are found.
