Skip to main content
←API Reference ←com.nianticspatial.nsdk.sites ←SitesSession

requestSiteAssetsByLocation

Requests sites and assets near a GPS coordinate.

Declaration​

suspend fun requestSiteAssetsByLocation( lat: Double, lng: Double, radiusMeters: Double, assetType: AssetType, timeoutMs: Long = DEFAULT_TIMEOUT_MS, scope: AssetScope = AssetScope.PRODUCTION ): SiteAssetsResult

Summary​

Requests sites and assets near a GPS coordinate.

Returns​

SiteAssetsResult containing the list of site-assets entries ordered by distance.

Throws​

  • SitesException — if the request fails with an error.
  • kotlinx.coroutines.CancellationException — if the coroutine is cancelled.

Parameters​

NameTypeSummary
latDouble
Latitude of the query coordinate, in degrees.
lngDouble
Longitude of the query coordinate, in degrees.
radiusMetersDouble
Search radius around the coordinate, in meters.
assetTypeAssetType
The type of assets to filter results by (C value from [AssetType]).
timeoutMsLong
Maximum time to wait for the request to complete.
scopeAssetScope
Production assets only (the default), or every asset.