zoomTo Method

Moves the camera to a specific distance from the terrain.

zoomTo(distanceFromPOI);

 

Parameter

Description

distanceFromPOI

The distance from the camera to the point on the terrain that the camera center is looking at

Remarks

The outcome of the zoomTo operation depends on the current distance between the camera and the camera’s point of interest (POI) at the center of the view. If ditanceFromPOI is bigger than the current distance between the camera and the point of interest, the camera moves backwards. If it is smaller, it moves forward.

It is possible to use the predefined Skyline Globe Levels as input to this method.

Example

The following examples illustrate the use of the zoomTo method.

 

function zoomToStateLevel()

{

   globe.navigate.zoomTo(sgLevelState);

}

 

 

 

function zoomTo10km()

{

   globe.navigate.zoomTo(10000);   distance in meters

}