Skip to main content
←API Reference ←NSDK ←NSDKSitesSession

requestSiteAssetsByLocation


Declaration​

func requestSiteAssetsByLocation(lat: Double, lng: Double, radiusMeters: Double, assetType: AssetType = .vpsInfo, pollingInterval: TimeInterval = 0.5, timeout: TimeInterval = 60.0) async throws -> SiteAssetsResult

Summary​

Requests sites and their assets near a GPS coordinate and waits for the result.
Results are ordered by distance from the query coordinate.

Returns​

A SiteAssetsResult containing site-assets entries ordered by distance.

Throws​

  • - CancellationError if the Task running this function was cancelled. - TimeoutError if the function timed out before it could complete execution. - SitesResult.Error if there was an error specific to the network query.

Parameters​

NameTypeSummary
latDouble
Latitude of the query coordinate.
lngDouble
Longitude of the query coordinate.
radiusMetersDouble
Search radius in meters.
assetTypeAssetType
The type of assets to fetch (default: .vpsInfo).
pollingIntervalTimeInterval
The interval between status checks (default: 0.5 seconds).
timeoutTimeInterval
Maximum time to wait for completion (default: 60 seconds).