Skip to main content
Version: 3.5

class CoverageClientManager

(Niantic.Lightship.AR.VpsCoverage.CoverageClientManager)

Overview

The CoverageClientManager component provides the ability to query VPS coverage area and localization target information within a specified radius from either a device's current location or a specified location. Additionally, private VPS-scans can also be provided to this manager to have them be included in the query result for testing purposes (as private VPS-scans are not currently included in the query response).

    class CoverageClientManager: MonoBehaviour {
public:
// properties

bool UseCurrentLocation;
int QueryRadius;
float QueryLatitude;
float QueryLongitude;
LocalizationTarget[] PrivateARLocalizationTargets;

// methods

void TryGetCoverage(Action<AreaTargetsResult> onTryGetCoverage);
Task<Texture> TryGetImageFromUrl(string imageUrl);
void TryGetImageFromUrl(string imageUrl, Action<Texture> onImageDownloaded);
Task<Texture> TryGetImageFromUrl(string imageUrl, int width, int height);

void TryGetImageFromUrl(
string imageUrl,
int width,
int height,
Action<Texture> onImageDownloaded
);
};

Detailed Documentation

The CoverageClientManager component provides the ability to query VPS coverage area and localization target information within a specified radius from either a device's current location or a specified location. Additionally, private VPS-scans can also be provided to this manager to have them be included in the query result for testing purposes (as private VPS-scans are not currently included in the query response).

Properties

UseCurrentLocation

bool UseCurrentLocation

Whether or not to use current location in the query

QueryRadius

int QueryRadius

The radius of the query in meters

QueryLatitude

float QueryLatitude

The latitude of the query

QueryLongitude

float QueryLongitude

The longitude of the query

PrivateARLocalizationTargets

LocalizationTarget[] PrivateARLocalizationTargets

The localization targets for the private scans

Methods

TryGetCoverage

void TryGetCoverage(Action<AreaTargetsResult> onTryGetCoverage)

Queries for coverage

    Parameters:

    onTryGetCoverage - Callback after query completes

TryGetImageFromUrl

Task<Texture> TryGetImageFromUrl(string imageUrl)

Tries to get a hint image from the URL

    Parameters:

    imageUrl - The URL used to get the hint image

    Returns:

    The texture with the hint image fetched from the URL

TryGetImageFromUrl

void TryGetImageFromUrl(string imageUrl, Action<Texture> onImageDownloaded)

Tries to get a hint image from the URL

    Parameters:

    imageUrl - The URL used to get the hint image

    onImageDownloaded - Callback after the hint image is downloaded

TryGetImageFromUrl

Task<Texture> TryGetImageFromUrl(string imageUrl, int width, int height)

Tries to get a hint image from the URL

    Parameters:

    imageUrl - The URL used to get the hint image

    width - The requested width of the hint image

    height - The requested height of the hint image

    Returns:

    The texture with the hint image

TryGetImageFromUrl

void TryGetImageFromUrl(
string imageUrl,
int width,
int height,
Action<Texture> onImageDownloaded
)

Tries to get a hint image from the URL

    Parameters:

    imageUrl - The URL used to get the hint image

    width - The requested width of the hint image

    height - The requested height of the hint image

    onImageDownloaded - Callback when the hint image has been downloaded