getData
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 beundefined
if there is no active sphere:sphereLat
(number): The latitude of the active spheresphereLng
(number): The longitude of the active spheretitle
(string): The title of the active spherelookAtLat
(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 viewcameraFovMin
(number): The minimum valid field of view for the current spherecameraFovMax
(number): The maximum valid field of view for the current spherecameraZoom
(number): A number representing the current zoom levelcameraZoomMin
(number): The minimum valid zoom level for the current spherecameraZoomMax
(number): The maximum valid zoom level for the current sphereautoRotate
(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-rotationright
(boolean): Iftrue
, then rotate right. Iffalse
, then rotate left.tilt
(number): The tilt for the camera to rotate towards and then holdfov
(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 spherepolygonLayers
(array): An array of the polygon layers for the active spherepanoMarkerDistance
(number): The distance, in meters, for which sphere markers are displayedpanoMarkerList
(Array<number>): The list of specific sphere markers to display, by sphere idcustomMarkerDistance
(number): The distance, in meters, for which custom markers are displayedcustomMarkerList
(Array<number>): The list of specific custom markers to display, by custom marker idviewerDisplayOrder
(Array<string>): The list of the draw order for objects in the viewergrowOnZoom
(boolean): Determines if the markers in the viewer scale on zooming in.
Returns: A promise that resolves to the same object that is passed to the optional callback.