uPano  v2.3
InfinityCode.uPano.Services.GoogleStreetView Class Reference

Component for downloading panoramas from Google Street View More...

Inheritance diagram for InfinityCode.uPano.Services.GoogleStreetView:
InfinityCode.uPano.Plugins.Plugin

Public Types

enum  LoadType { LoadType.id, LoadType.location }
 Types of downloading panoramas More...
 
enum  RegisterAs { RegisterAs.loadMap = 0, RegisterAs.downloadStreetViewImage = 1 }
 How to register a request More...
 

Public Member Functions

GoogleStreetViewRequest Download ()
 Start downloading the panorama More...
 

Static Public Member Functions

static GoogleStreetViewRequest DownloadByID (string key, string id, int zoom=3, string language="en", RegisterAs registerAs=RegisterAs.loadMap)
 Download panorama by id More...
 
static GoogleStreetViewRequest DownloadByLocation (string key, double lng, double lat, int zoom=3, string language="en", RegisterAs registerAs=RegisterAs.loadMap)
 Download panorama by location More...
 

Public Attributes

Action< GoogleStreetViewRequestOnError
 Action that occurs when the request is failed More...
 
Action OnLoaded
 Action that occurs when a panorama or zoom level is loaded. More...
 
string apiKey
 Google API key More...
 
bool directions = true
 Show directions to neighboring panoramas More...
 
GameObject directionPrefab
 Prefab of a direction arrow More...
 
LoadType loadType = LoadType.id
 Type of downloading a panorama More...
 
double locationLat
 Latitude of a panorama More...
 
double locationLng
 Longitude of a panorama More...
 
GoogleStreetViewMeta meta
 Metadata for the current panorama. More...
 
string panoID
 ID of a panorama More...
 
bool progressive = true
 Use progressive loading panoramas (zoom - 0, 1, 2, 3, 4) More...
 
int zoom = 3
 Zoom of panorama (0-4). Size of side = 512 * 2 ^ zoom More...
 
RegisterAs registerAs = RegisterAs.loadMap
 How to register a request More...
 

Additional Inherited Members

- Properties inherited from InfinityCode.uPano.Plugins.Plugin
Pano pano [get]
 Reference to the panorama More...
 
PanoRenderer panoRenderer [get]
 Reference to the pano renderer More...
 

Detailed Description

Component for downloading panoramas from Google Street View

Member Enumeration Documentation

◆ LoadType

Types of downloading panoramas

Enumerator
id 

Download a panorama by id

location 

Download a panorama by location

◆ RegisterAs

How to register a request

Enumerator
loadMap 

Register as load of map

downloadStreetViewImage 

Register as Street View Image request

Member Function Documentation

◆ Download()

GoogleStreetViewRequest InfinityCode.uPano.Services.GoogleStreetView.Download ( )

Start downloading the panorama

Returns
Instance of the request

◆ DownloadByID()

static GoogleStreetViewRequest InfinityCode.uPano.Services.GoogleStreetView.DownloadByID ( string  key,
string  id,
int  zoom = 3,
string  language = "en",
RegisterAs  registerAs = RegisterAs.loadMap 
)
static

Download panorama by id

Parameters
keyGoogle API key
idID of the panorama
zoomZoom of panorama (0-4). Size of side = 512 * 2 ^ zoom
languageLanguage code of the meta
registerAsHow to register a request
Returns
Instance of the request

◆ DownloadByLocation()

static GoogleStreetViewRequest InfinityCode.uPano.Services.GoogleStreetView.DownloadByLocation ( string  key,
double  lng,
double  lat,
int  zoom = 3,
string  language = "en",
RegisterAs  registerAs = RegisterAs.loadMap 
)
static

Download panorama by location

Parameters
keyGoogle API key
lngLongitude
latLatitude
zoomZoom of panorama (0-4). Size of side = 512 * 2 ^ zoom
languageLanguage code of the meta
registerAsHow to register a request
Returns
Instance of the request

Member Data Documentation

◆ apiKey

string InfinityCode.uPano.Services.GoogleStreetView.apiKey

Google API key

◆ directionPrefab

GameObject InfinityCode.uPano.Services.GoogleStreetView.directionPrefab

Prefab of a direction arrow

◆ directions

bool InfinityCode.uPano.Services.GoogleStreetView.directions = true

Show directions to neighboring panoramas

◆ loadType

LoadType InfinityCode.uPano.Services.GoogleStreetView.loadType = LoadType.id

Type of downloading a panorama

◆ locationLat

double InfinityCode.uPano.Services.GoogleStreetView.locationLat

Latitude of a panorama

◆ locationLng

double InfinityCode.uPano.Services.GoogleStreetView.locationLng

Longitude of a panorama

◆ meta

GoogleStreetViewMeta InfinityCode.uPano.Services.GoogleStreetView.meta

Metadata for the current panorama.

◆ OnError

Action<GoogleStreetViewRequest> InfinityCode.uPano.Services.GoogleStreetView.OnError

Action that occurs when the request is failed

◆ OnLoaded

Action InfinityCode.uPano.Services.GoogleStreetView.OnLoaded

Action that occurs when a panorama or zoom level is loaded.

◆ panoID

string InfinityCode.uPano.Services.GoogleStreetView.panoID

ID of a panorama

◆ progressive

bool InfinityCode.uPano.Services.GoogleStreetView.progressive = true

Use progressive loading panoramas (zoom - 0, 1, 2, 3, 4)

◆ registerAs

RegisterAs InfinityCode.uPano.Services.GoogleStreetView.registerAs = RegisterAs.loadMap

How to register a request

◆ zoom

int InfinityCode.uPano.Services.GoogleStreetView.zoom = 3

Zoom of panorama (0-4). Size of side = 512 * 2 ^ zoom