Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • sphereData (object): An object with many optional properties. This function may take actions using one or more of these properties, as indicated:

    • sphereLat and sphereLng (numbers): If both of these properties are passed, then the nearest sphere to the specified coordinates will be found and acted upon as follows:

      • The sphere found will be set as the active sphere and loaded

      • If lookAtLat and lookAtLng are also passed in the sphereData object, then they will be used to set the pan and tilt. The specified coordinates will be used to calculate a pixel viewable from the newly loaded sphere, and the sphere will be rotated such that that pixel will be in the center of the screen. See getData.

      • If lookAtLat and/or lookAtLng are not passed, then the default orientation will be used for the loaded sphere

    • cameraFov (number): The field of view will be set to the given value. See getFov.

    • cameraFovMin (number): If the specified value is greater than 5, then this function sets the minimum allowed field of view to the given value. See getFovRange.

    • cameraFovMax (number): If the specified value is less than 120, then this function sets the maximum allowed field of view to the given value. See getFovRange.

    • cameraZoom (number): The zoom level will be set to the given value. See getZoom.

    • cameraZoomMin (number): If the specified value is greater than 0, then this function sets the minimum allowed zoom level to the given value. See getZoomRange.

    • cameraZoomMax (number): If the specified value is greater than 0, then this function sets the maximum allowed zoom level to the given value. See getZoomRange.

    • title (string): The title of the active sphere will be updated to this value.

    • sphereMarkerDistance (number): The distance, in meters, for which sphere markers are displayed. The default is 4000. See setSphereMarkerDistance.

    • sphereMarkerList (Array<number>): The list of specific sphere markers to display, by sphere id. Ignores the distance defined by sphereMarkerDistance. See setSphereMarkerList.

    • customMarkerDistance(number): The distance, in meters, for which custom markers are displayed. See setCustomMarkerDistance.

    • customMarkerList(Array<number>): The list of specific custom markers to display, by custom marker id. Ignores the distance defined by customMarkerDistance. See setCustomMarkerList.

    • polygonDistance(number): The distance, in meters, for which sphere markers are displayed. The default is 4000. See setPolygonDistance

    • layers (name marked for deprecation) | markerLayers(array of objects): A layer, is an Array of markers. Each item in the array will be treated as a layer object. For each layer, the following will happen (see also getLayer):

      • Each of the layer’s markers that is missing an id will be assigned a uuid

      • The layer will be validated

      • The layer will be sanitized

    • polygonLayers(array of objects): A layer, is an Array of polygons. Each item in the array will be treated as a layer object. For each layer, the following will happen (see also getLayer):

      • Each of the layer’s markers that is missing an id will be assigned a uuid

      • The layer will be validated

      • The layer will be sanitized

    • autoRotate (object): If any of the following propertied are specified in the object, then they will be updated for the current sphere. See getData.

      • 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

    • viewerDisplayOrder(Array<string>): ['polygons', 'spheres', 'icons', 'text'] Uses the 4 items in the array to determine rendering order. Requires all options to be passed but can be done in any order.

Returns: Nothing

Note: The field of view and zoom settings are complimentary. You should either set cameraFov, cameraFovMin, and cameraFov; or cameraZoom, cameraZoomMin, and cameraZoomMax; but not both sets of values.

...