# localize Source: https://www.nianticspatial.com/docs/api/swift/NSDK.NSDKVps2Session.method-localize/ 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. > **Info:** > > **Notice** > > Note: May be called before `start()`; the request is deferred and dispatched ### Parameters | Name | Type | Summary | | --- | --- | --- | | siteId | String | 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. > **Info:** > > **Notice** > > Note: May be called before `start()`; the request is deferred and dispatched > **Info:** > > **Notice** > > Warning: Submitted assets stay in the localization set for the lifetime of the ### Parameters | Name | Type | Summary | | --- | --- | --- | | siteId | String | The identifier of the site to localize to. | ---