Skip to main content
API Reference SwiftyNsdk NsdkVpsCoverageSession

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

Summary

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 AreaTargetResult containing area target data.
- Throws:
- CancellationError if the Task running this function was cancelled.
- TimeoutError if the function timed out before it could complete execution.
- VpsCoverageResult.Error if there was an error specific to the VPS Coverage
query.


ON THIS PAGE