~~NOCACHE~~ ====== Class orbit.webclient.PanoramaViewer ====== ===== Class Summary ===== ^ Constructor Attributes ^ Constructor Name and Description ^ | | ''**[[orbit.webclient.PanoramaViewer#constructor|orbit.webclient.PanoramaViewer]]**(viewerId, flash)''\\ Class PanoramaViewer models a single panorama viewer. | ===== Method Summary ===== ^ Method Attributes ^ Method Name and Description ^ | | ''**[[orbit.webclient.PanoramaViewer#addEventListener|addEventListener]]**(eventType, handler)''\\ Add an event listener. | | | ''**[[orbit.webclient.PanoramaViewer#getFOV|getFOV]]**()''\\ Get the FOV of the panorama. | | | ''**[[orbit.webclient.PanoramaViewer#getPan|getPan]]**()''\\ Get the pan angle of the panorama. | | | ''**[[orbit.webclient.PanoramaViewer#getPhoto|getPhoto]]**()''\\ Get the current photo. | | | ''**[[orbit.webclient.PanoramaViewer#getSnapshot|getSnapshot]]**()''\\ Get the last panorama snapshot. | | | ''**[[orbit.webclient.PanoramaViewer#getTilt|getTilt]]**()''\\ Get the tilt angle of the panorama. | | | ''**[[orbit.webclient.PanoramaViewer#getViewerId|getViewerId]]**()''\\ Get the identifier of this viewer. | | | ''**[[orbit.webclient.PanoramaViewer#loadPhoto|loadPhoto]]**(photo, options)''\\ Load a photo. | | | ''**[[orbit.webclient.PanoramaViewer#loadPhotoAtLatLon|loadPhotoAtLatLon]]**(lat, lon, options)''\\ Load a photo close to a specified coordinate. | | | ''**[[orbit.webclient.PanoramaViewer#loadPhotoAtXY|loadPhotoAtXY]]**(x, y, crs, options)''\\ Load a photo close to a specified coordinate. | | | ''**[[orbit.webclient.PanoramaViewer#loadPhotoById|loadPhotoById]]**(photo, options)''\\ Load a photo. | | | ''**[[orbit.webclient.PanoramaViewer#lookAtXY|lookAtXY]]**(coordinate, crs, crs)''\\ Look at a specific spatial position. | | | ''**[[orbit.webclient.PanoramaViewer#lookAtXYZ|lookAtXYZ]]**(coordinate, crs, z, crs)''\\ Look at a specific spatial position. | | | ''**[[orbit.webclient.PanoramaViewer#removeEventListener|removeEventListener]]**(eventType, handler)''\\ Remove an event listener. | | | ''**[[orbit.webclient.PanoramaViewer#setFOV|setFOV]]**(value)''\\ Set the FOV of the panorama. | | | ''**[[orbit.webclient.PanoramaViewer#setPan|setPan]]**(value)''\\ Set the pan angle of the panorama. | | | ''**[[orbit.webclient.PanoramaViewer#setTilt|setTilt]]**(value)''\\ Set the tilt angle of the panorama. | | | ''**[[orbit.webclient.PanoramaViewer#updateSnapshot|updateSnapshot]]**()''\\ Update the panorama snapshot. | ===== Class Detail ===== '''' **orbit.webclient.PanoramaViewer**(viewerId, flash)\\ Class PanoramaViewer models a single panorama viewer. **Parameters** | ''{String}'' **viewerId** | The viewer identifier. | | ''{goog.ui.media.FlashObject}'' **flash** | The parent flash object. | ===== Method Detail ===== ==== addEventListener ==== Add an event listener. **Parameters** | ''{String}'' **eventType** | The event type to listen to. | | ''{[[Function|Function]]}'' **handler** | The function to call when the event occurs. | ==== getFOV ==== Get the FOV of the panorama. **Returns** ''{Float}'' Returns the FOV (horizontal fov, degrees). ==== getPan ==== Get the pan angle of the panorama. **Returns** ''{Float}'' Returns the pan angle. ==== getPhoto ==== Get the current photo. ==== getSnapshot ==== Get the last panorama snapshot. **Returns** returns a base64 encoded jpeg image. ==== getTilt ==== Get the tilt angle of the panorama. **Returns** ''{Float}'' Returns the tilt angle. ==== getViewerId ==== Get the identifier of this viewer. **Returns** ''{String}'' Returns the identifier. ==== loadPhoto ==== Load a photo. **Parameters** | **photo** | The photo to load. | | **options** | The set of [[180:developer:webclient:load_photo_options|load-photo options]]. | ==== loadPhotoAtLatLon ==== Load a photo close to a specified coordinate. **Parameters** | **lat** | The coordinate latitude. | | **lon** | The coordinate longitude. | | **options** | The set of [[180:developer:webclient:load_photo_options|load-photo options]]. | ==== loadPhotoAtXY ==== Load a photo close to a specified coordinate. **Parameters** | **x** | The x coordinate ordinal. | | **y** | The y coordinate ordinal. | | **crs** | The crs of the coordinate. | | **options** | The set of [[180:developer:webclient:load_photo_options|load-photo options]]. | ==== loadPhotoById ==== Load a photo. **Parameters** | **photo** | The photo to load. | | **options** | The set of [[180:developer:webclient:load_photo_options|load-photo options]]. | ==== lookAtXY ==== Look at a specific spatial position. **Parameters** | **coordinate** | the coordinate to look at. | | **crs** | CRS of the specified coordinate. | | **crs** | | ==== lookAtXYZ ==== Look at a specific spatial position. **Parameters** | **coordinate** | the coordinate to look at. | | **crs** | CRS of the specified coordinate. | | **z** | | | **crs** | | ==== removeEventListener ==== Remove an event listener. **Parameters** | ''{String}'' **eventType** | The type of the event. | | ''{[[Function|Function]]}'' **handler** | The handler function. | ==== setFOV ==== Set the FOV of the panorama. **Parameters** | ''{Float}'' **value** | The new FOV. | ==== setPan ==== Set the pan angle of the panorama. **Parameters** | ''{Float}'' **value** | The new pan angle. | ==== setTilt ==== Set the tilt angle of the panorama. **Parameters** | ''{Float}'' **value** | The new tilt angle. | ==== updateSnapshot ==== Update the panorama snapshot. After this method is called, a snapshot is generated asynchronously. Wait for the SNAPSHOT_UPDATED event and then use getSnapshot() to retrieve the actual snapshot.