Skip to main content
←API Reference ←NSDK ←NSDKVps2Session

localize


Declaration​

func localize(siteId: String) throws

Summary​

Requests localization to a site, identified by its site ID.
Localizes against the site's production-deployed VPS assets and only those: an
asset that has not been deployed to production cannot be localized against.
Asynchronous: observe $latestLocalization for the outcome.
Requests are additive: calling this again does not disturb a request already in
flight, and the sites accumulate.

Throws​

  • NSDKError.invalidArgument if the site ID is empty.
Notice

Note: May be called before start(); the request is deferred and dispatched

Parameters​

NameTypeSummary
siteIdString
The identifier of the site to localize to.

Overload​

func localize(latitude: Double, longitude: Double, radiusMeters: Double = 0) throws

Summary​

Requests localization near a geographic coordinate.
Looks up every site holding VPS assets within radiusMeters of the coordinate and
localizes against all of their assets. The radius is the only way to narrow the
search. Asynchronous: observe $latestLocalization for the outcome.
Requests are additive: calling this again does not disturb a request already in
flight, and the assets accumulate.

Throws​

  • NSDKError.invalidArgument if a coordinate is out of range, the radius is negative, or any argument is not a finite number.
Notice

Note: May be called before start(); the request is deferred and dispatched

Notice

Warning: Submitted assets stay in the localization set for the lifetime of the

Parameters​

NameTypeSummary
siteIdString
The identifier of the site to localize to.