Skip to main content
API Reference com.nianticspatial.nsdk.vps VPSCoverageSession

getAreaTargets

Asynchronously retrieves area targets within a specified radius of a geographic location. This function encapsulates the entire request-and-poll loop, suspending execution until the operation is complete, has failed, or has timed out.

Declaration

suspend fun getAreaTargets( latLng: LatLng, radius: Int, timeoutMillis: Long = TIMEOUT_MS ): AsyncResult<Array<AreaTarget>, VpsCoverageError>

Summary

Asynchronously retrieves area targets within a specified radius of a geographic location. This function encapsulates the entire request-and-poll loop, suspending execution until the operation is complete, has failed, or has timed out.

Returns

An [AsyncResult] which will be either [AsyncResult.Success] containing an array of [AreaTarget]s, [AsyncResult.Error] detailing the failure reason, or [AsyncResult.Timeout] indicating a timeout in the process.


ON THIS PAGE