Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.XRSubsystems ←XRVps2Subsystem

TryLocalize

Requests localization to a site, identified by its site ID.

Declaration​

public bool TryLocalize(string siteId)

Summary​

Requests localization to a site, identified by its site ID.

Remarks​

Localizes against the site's production-deployed VPS assets only. Asynchronous:
observe the outcome via GetLatestLocalization's localized asset and
tracking state. Requests are additive, and submitted assets stay in the
localization set until TryStopLocalize removes them; stopping and
restarting the subsystem does not remove them. The subsystem must be running;
a request made while it is stopped is rejected.

Returns​

True if the request was started.

Parameters​

NameTypeSummary
siteIdstring
The identifier of the site to localize to.

Overload 1​

public bool TryLocalize(string siteId, string assetId)

Summary​

Requests localization to one VPS map asset of a site.

Remarks​

Like TryLocalize, but assetId
narrows it to that single asset of any deployment, including non-production ones.
assetId is the VPS map asset's ID, as a UUID (32 hex digits,
optionally 0x-prefixed, or the canonical 8-4-4-4-12 form), not the ID of the
asset group's mesh or splat. An empty string localizes against the site's
production-deployed assets, exactly as TryLocalize does. Any
other value is rejected. When the site has no localizable asset with that ID, the
request fails asynchronously. TryStopLocalize with the site's ID
stops it. The subsystem must be running.

Returns​

True if the request was started.

Parameters​

NameTypeSummary
siteIdstring
The identifier of the site the asset belongs to.
assetIdstring
The VPS map asset's ID, or empty for the site's production
assets.

Overload 2​

public bool TryLocalize(double latitude, double longitude, double radiusMeters = 0)

Summary​

Requests localization near a geographic coordinate.

Remarks​

Looks up every site holding VPS assets within radiusMeters of the
coordinate and localizes against their production-deployed assets only.
Asynchronous: observe the
outcome via GetLatestLocalization's tracking state and localized asset.
Requests are additive, and submitted assets stay in the localization set until
TryStopLocalize removes them; stopping and restarting the subsystem
does not remove them. The subsystem must be running; a request made while it is
stopped is rejected.

Returns​

True if the request was started.

Parameters​

NameTypeSummary
latitudedouble
Latitude of the search center, in the range [-90, 90].
longitudedouble
Longitude of the search center, in the range [-180, 180].
radiusMetersdouble
Search radius in meters. Zero uses the default value
(100 m). Must not be negative.