Skip to main content

ARDK for Android/com.nianticlabs.ardk.vps/VPSCoverageSession/getAreaTargets

getAreaTargets

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

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.

Return​

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

Parameters​

androidJvm

latLngGeographic coordinates to query around.
radiusSearch radius in meters.
timeoutMillisThe maximum time in milliseconds to wait for the operation to complete.