getActiveSphere

Gets the active sphere, passes it to the optional callback function (if provided), and returns it.

getActivePano has been deprecated and replaced with getActiveSphere. This is not a breaking change.

Parameter:

  • callback (function): (OPTIONAL) A callback function to execute. It will be passed an object with the following attributes automatically:

    • id (number): The id of the sphere

    • lat (number): The latitude of the sphere

    • lng (number): The longitude of the sphere

    • dateTimeAcquired (string | null): A string representing the date that the sphere imagery was captured

Returns: A promise that resolves to the same object that is passed to the optional callback.

Code Sample