Class: Navigator

Navigator(camera)

Represents a navigator containing the required variables to enable the user to pan, zoom and tilt the globe.

Constructor

Constructs a navigator.
Parameters:
Name Type Description
camera ArcBallCamera | FirstPersonCamera The camera associated with the navigator
Source:
Throws:
If the camera is missing
Type
ArgumentError

Members

camera :ArcBallCamera|FirstPersonCamera

The camera associated with the navigator
Type:
Source:

heading :Number

This navigator's heading, in degrees clockwise from north
Type:
  • Number
Default Value:
  • 0
Source:

lookAtLocation :Position

The geographic location at the center of the viewport
Type:
Source:

range :Number

The distance from this navigator's eye point to its look-at location
Type:
  • Number
Default Value:
  • 10,000 kilometers
Source:

roll :Number

This navigator's roll, in degrees
Type:
  • Number
Default Value:
  • 0
Source:

tilt :Number

This navigator's tilt, in degrees
Type:
  • Number
Default Value:
  • 0
Source:

Methods

getAsArcBallCamera(camera) → {ArcBallCamera}

Returns the camera of this navigator as an ArcBallCamera instance. If the camera is a FirstPersonCamera then it is converted to an ArcBallCamera, otherwise a copy of the camera is returned.
Parameters:
Name Type Description
camera ArcBallCamera | undefined A camera where to save the results
Source:
Returns:
the ArcBallCamera representation of this navigator.
Type
ArcBallCamera

getAsFirstPersonCamera(camera) → {FirstPersonCamera}

Returns the camera of this navigator as a FirstPersonCamera instance. If the camera is an ArcBallCamera then it is converted to a FirstPersonCamera, otherwise a copy of the camera is returned.
Parameters:
Name Type Description
camera FirstPersonCamera | undefined A camera where to save the results
Source:
Returns:
the FirstPersonCamera representation of this navigator.
Type
FirstPersonCamera