Gets the data specified below about the active sphere, passes it to the optional callback function (if provided), and returns it. |
Parameter:
callback
(function): (OPTIONAL) A callback function to execute. It will be passed an object with the following attributes automatically. Each of these attributes will be undefined
if there is no active sphere:
sphereLat
(number): The latitude of the active sphere
sphereLng
(number): The longitude of the active sphere
title
(string): The title of the active sphere
lookAtLat
(number): The latitude of the pixel the user is looking at. See sendData .
lookAtLng
(number): The longitude of the pixel the user is looking at. See sendData.
cameraFov
(number): A number representing the current field of view
cameraFovMin
(number): The minimum valid field of view for the current sphere
cameraFovMax
(number): The maximum valid field of view for the current sphere
cameraZoom
(number): A number representing the current zoom level
cameraZoomMin
(number): The minimum valid zoom level for the current sphere
cameraZoomMax
(number): The maximum valid zoom level for the current sphere
autoRotate
(object): The autorotate object for the current sphere. It has the following properties. See sendData for how to update this object.
on
(boolean): Whether or not the camera should be automatically rotating (ie, panning around the sphere)
speed
(number): The speed of auto-rotation
right
(boolean): If true
, then rotate right. If false
, then rotate left.
tilt
(number): The tilt for the camera to rotate towards and then hold
fov
(number): The field of view for the camera to rotate towards and then hold
layers
(array): An array of the layers for the active sphere (marked for deprecation)
markerLayers
(array): An array of the marker layers for the active sphere
polygonLayers
(array): An array of the polygon layers for the active sphere
panoMarkerDistance
(number): The distance, in meters, for which sphere markers are displayed
panoMarkerList
(Array<number>): The list of specific sphere markers to display, by sphere id
customMarkerDistance
(number): The distance, in meters, for which custom markers are displayed
customMarkerList
(Array<number>): The list of specific custom markers to display, by custom marker id
viewerDisplayOrder
(Array<string>): The list of the draw order for objects in the viewer
Returns: A promise that resolves to the same object that is passed to the optional callback.