My favorites | English | Sign in

Try Google Chrome's developer tools New!

Google Earth API

GEView Interface Reference

List of all members.


Public Member Functions

void setAbstractView (KmlAbstractView view)
KmlLookAt copyAsLookAt (KmlAltitudeModeEnum altitudeMode)
KmlCamera copyAsCamera (KmlAltitudeModeEnum altitudeMode)
KmlLatLonBox getViewportGlobeBounds ()
GEHitTestResult hitTest (float x, KmlUnitsEnum xUnits, float y, KmlUnitsEnum yUnits, GEHitTestModeEnum mode)
Events


void viewchangebegin ()
void viewchangeend ()
void viewchange ()

Detailed Description

Controls the behavior of the camera that views the scene in Google Earth.

Member Function Documentation

void GEView.setAbstractView ( KmlAbstractView  view  ) 

Sets the camera that views the scene in Google Earth

KmlLookAt GEView.copyAsLookAt ( KmlAltitudeModeEnum  altitudeMode  ) 

Creates and returns a new KmlLookAt object, initialized to the current camera position and orientation. Use 'altitudeMode' to specify the altitude mode of the looked-at point.

See also:
GEPlugin.ALTITUDE_RELATIVE_TO_GROUND

GEPlugin.ALTITUDE_ABSOLUTE

GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR

KmlCamera GEView.copyAsCamera ( KmlAltitudeModeEnum  altitudeMode  ) 

Creates and returns a new KmlCamera object, initialized to the current camera position and orientation. Use 'altitudeMode' to specify the altitude mode of the new camera.

See also:
GEPlugin.ALTITUDE_RELATIVE_TO_GROUND

GEPlugin.ALTITUDE_ABSOLUTE

GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR

KmlLatLonBox GEView.getViewportGlobeBounds (  ) 

Returns a bounding box that completely contains the region of the globe that is currently visible. The returned box will be larger than what is strictly visible, if that is necessary to include everything that is visible.

Returns:
Returns a KmlLatLonBox corresponding to the bounding box of the current viewport or null if no part of the globe is visible.

GEHitTestResult GEView.hitTest ( float  x,
KmlUnitsEnum  xUnits,
float  y,
KmlUnitsEnum  yUnits,
GEHitTestModeEnum  mode 
)

Given a point on the screen in pixel coordinates, returns a GEHitTestResult with information about the geographic location corresponding to the point on the screen.

Parameters:
x The x coordinate, measured from the left or right edge of the plug-in window, depending on xUnits.
xUnits The units in which the x value is specified.
y The y coordinate, measured from the top or bottom edge of the plug-in window, depending on yUnits.
yUnits The units in which the y value is specified.
mode Selects which categories of objects to include in the hit test. Categories may be combined via JavaScript's OR operator, '|'.
Returns:
Returns a GEHitTestResult, or null if the screen point is not over anything selected by mode. Note that for HIT_TEST_GLOBE, resulting altitude values will always be 0.
See also:
GEPlugin.UNITS_PIXELS

GEPlugin.UNITS_INSET_PIXELS

GEPlugin.UNITS_FRACTION

GEPlugin.HIT_TEST_GLOBE

GEPlugin.HIT_TEST_TERRAIN

GEPlugin.HIT_TEST_BUILDINGS

void GEView.viewchangebegin (  ) 

Event fired when the view begins changing in Earth. This event will be fired once, followed by successive viewchange events, and ending with a viewchangeend event.

void GEView.viewchangeend (  ) 

Event fired when the view stops changing in Earth.

void GEView.viewchange (  ) 

Event fired while the view is changing in Earth. This event will be triggered in rapid succession while the camera is in motion.