requestAreaTargets
Requests all available area targets within a specified radius....
Declaration
func requestAreaTargets(locationLatLng latLng: LatLng, searchRadius radius: Int, timeout: TimeInterval = 60.0, pollingInterval: TimeInterval = 0.5) async throws -> AreaTargetResult
Requests all available area targets within a specified radius.
Starts a network request to fetch nearby area targets and suspends until
the operation completes, fails, or times out.
- Parameters:
- locationLatLng: The center coordinates of the search area.
- searchRadius: The radius in meters to search for area targets.
- timeout: Maximum duration to wait for a result. Default is 60 seconds.
- pollingInterval: Interval between progress checks. Default is 0.5 seconds.
- Returns: An
AreaTargetResultcontaining area target data.- Throws:
-
CancellationErrorif the Task running this function was cancelled.-
TimeoutErrorif the function timed out before it could complete execution.-
VpsCoverageResult.Errorif there was an error specific to the VPS Coveragequery.