# TryGetDeviceGeolocation Source: https://www.nianticspatial.com/docs/api/unity/NianticSpatial.NSDK.AR.VPS2.ARVps2Manager.TryGetDeviceGeolocation/ TryGetDeviceGeolocation Attempts to get the geolocation of the device's last known camera pose. --- ## Declaration public bool TryGetDeviceGeolocation(out XRVps2Geolocation geolocationOut, HeadingMode headingMode = HeadingMode.CameraDirection) #### Summary Attempts to get the geolocation of the device's last known camera pose. #### Returns true if the subsystem is available; otherwise false. ### Parameters | Name | Type | Summary | | --- | --- | --- | | geolocationOut | XRVps2Geolocation | Receives the geolocation data on success. | | headingMode | HeadingMode | Controls how the heading is derived. Use CameraDirection when the device is upright, or DeviceTop when flat or for a compass-style heading. | ---