class CoverageClient
(Niantic.Lightship.AR.VpsCoverage.CoverageClient)
Overview
Client to request CoverageAreas and LocalizationTargets.
class CoverageClient {
public:
// methods
CoverageClient(LightshipSettings lightshipSettings);
CoverageClient();
async void TryGetCoverageAreas(
LatLng queryLocation,
int queryRadius,
Action<CoverageAreasResult> onAreasReceived
);
async void TryGetLocalizationTargets(
string[] targetIdentifiers,
Action<LocalizationTargetsResult> onTargetsReceived
);
async void TryGetCoverage(
LatLng queryLocation,
int queryRadius,
Action<AreaTargetsResult> onLocationsReceived,
LocalizationTarget[] privateScanLocalizationTargets = null
);
async Task<Texture> TryGetImageFromUrl(string imageUrl);
async void TryGetImageFromUrl(
string imageUrl,
Action<Texture> onImageDownloaded
);
async Task<Texture> TryGetImageFromUrl(string imageUrl, int width, int height);
async void TryGetImageFromUrl(
string imageUrl,
int width,
int height,
Action<Texture> onImageDownloaded
);
};
Detailed Documentation
Client to request CoverageAreas and LocalizationTargets.
Methods
TryGetCoverageAreas
async void TryGetCoverageAreas(
LatLng queryLocation,
int queryRadius,
Action<CoverageAreasResult> onAreasReceived
)
Request CoverageAreas at device location within a radius using the callback pattern.
Parameters:
queryLocation
- Center of query
queryRadius
- Radius for query between 0m and 2000m. A negative radius will default to the maximum radius of 2000m.
onAreasReceived
- Callback invoked when the requested CoverageAreas are ready.
TryGetLocalizationTargets
async void TryGetLocalizationTargets(
string[] targetIdentifiers,
Action<LocalizationTargetsResult> onTargetsReceived
)
Request LocalizationTargets for a set of identifiers using the callback pattern.
Parameters:
targetIdentifiers
- Set of unique identifiers of the requested targets.
onTargetsReceived
- Callback invoked when the requested LocalizationTargets are ready.
TryGetCoverage
async void TryGetCoverage(
LatLng queryLocation,
int queryRadius,
Action<AreaTargetsResult> onLocationsReceived,
LocalizationTarget[] privateScanLocalizationTargets = null
)
Request coupled CoverageAreas and LocalizationTargets within a radius, using the callback pattern.
Parameters:
queryLocation
- Center of query
queryRadius
- Radius for query between 0m and 2000m. A negative radius will default to the maximum radius of 2000m.
onLocationsReceived
- Callback invoked when the requested CoverageAreas and LocalizationTargets are ready.
privateScanLocalizationTargets
- Optional. For any LocalizationTarget included in this array, a corresponding AreaTarget will be added to the AreaTargets returned through the onLocationsReceived callback. Specify your private AR Locations via the CoverageClientManager in order to utilize this parameter.
TryGetImageFromUrl
async Task<Texture> TryGetImageFromUrl(string imageUrl)
Downloads the image from the provided url as a texture, using the async await pattern.
Parameters: