# Device Location

```swift
BiometridStandard.getInstance().getLocation(callback: callback)
```

| Parameter                     | Description      |
| ----------------------------- | ---------------- |
| callback: **ProcessCallback** | Process callback |

## Implementation example

```swift
import UIKit
import BiometridStandardSDK

class ViewController: UIViewController, ProcessCallback {
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    @IBAction func getLocationBtn(_ sender: Any) {
        BiometridStandard.getInstance().getLocation(callback: self)
    }

    func locationCallback(location: LocationData?, error: Errors?) {
        if error != nil {
            print(error?.rawValue)
            return
        }
        print("location", location.description)
    }
}

```

## Callback params

<table data-header-hidden><thead><tr><th width="274">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>location: <strong>LocationData?</strong></td><td>The device location coordinates</td></tr><tr><td>error: <strong>Errors?</strong></td><td>Errors associated enum</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="274">LocationData</th><th>Description</th></tr></thead><tbody><tr><td>altitude: <strong>Double</strong></td><td>The device altitude coordinates.</td></tr><tr><td>longitude: <strong>Double</strong></td><td>The device longitude coordinates.</td></tr><tr><td>latitude: <strong>Double</strong></td><td>The device latitude coordinates.</td></tr></tbody></table>
