Home > Working with SGWorld > Navigate (INavigate6) > ZoomTo
This method controls the zooming operation of the camera. The distanceFromPOI parameter specifies the distance from the ground at the center point of the 3D Window where the zoom operation stops.
JavaScript |
|
ZoomTo( distanceFromPOI, Flags) |
C# |
|
void ZoomTo( double distanceFromPOI, int Flags = 0) |
C++ |
|
HRESULT ZoomTo( double distanceFromPOI, long Flags) |
Parameters
distanceFromPOI
The distance from the camera to the point on the terrain that the camera center is looking at.
Flags
Determines the zoom level. Below are the valid flags:
·
sgLevelHouse
Equivalent to a distance/height of 100 meters
·
sgLevelStreet
Equivalent to a distance/height of 1 kilometer
·
sgLevelCity
Equivalent to a distance/height of 8 kilometer
·
sgLevelState
Equivalent to a distance/height of 800 kilometer
·
sgLevelCountry
Equivalent to a distance/height of 4000 kilometer
·
sgLevelGlobe
Equivalent to a distance/height of 15000 kilometer
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
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 distanceFromPOI 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.