Skip to main content
←API Reference ←com.nianticspatial.nsdk.vps2 ←Vps2GeolocationData

toLocation


Declaration​

fun toLocation(): Location

Summary​

Converts this VPS2 geolocation to an Android Location.


The returned Location has Location.getProvider set to LOCATION_PROVIDER_VPS2,
with Location.getAccuracy from horizontalAccuracyMetres, Location.getBearing from
heading (device orientation relative to true north), and on API 26+ vertical accuracy
from verticalAccuracyMetres and bearing accuracy from rotationAccuracyDeg.
Timestamp is set to the time of conversion.

Returns​

A new Location instance populated from this VPS2 geolocation data.