My favorites | English | Sign in

Google Earth API

GEPlugin Interface Reference

List of all members.


Public Member Functions

KmlObject parseKml (string kml)
GEAbstractBalloon getBalloon ()
void setBalloon (GEAbstractBalloon newActiveBalloon)
string getEarthVersion ()
string getPluginVersion ()
string getApiVersion ()
GEOptions getOptions ()
GEWindow getWindow ()
GEGlobe getGlobe ()
GESun getSun ()
KmlLayerRoot getLayerRoot ()
GEView getView ()
GENavigationControl getNavigationControl ()
GEFeatureContainer getFeatures ()
GETourPlayer getTourPlayer ()
GEPhotoOverlayViewer getPhotoOverlayViewer ()
float getStreamingPercent ()
Object Creation Functions


KmlPlacemark createPlacemark (string id)
KmlPoint createPoint (string id)
KmlLineString createLineString (string id)
KmlFolder createFolder (string id)
KmlLod createLod (string id)
KmlLatLonBox createLatLonBox (string id)
KmlLatLonAltBox createLatLonAltBox (string id)
KmlDocument createDocument (string id)
KmlRegion createRegion (string id)
KmlLocation createLocation (string id)
KmlOrientation createOrientation (string id)
KmlScale createScale (string id)
KmlModel createModel (string id)
KmlStyle createStyle (string id)
KmlLinearRing createLinearRing (string id)
KmlPolygon createPolygon (string id)
KmlIcon createIcon (string id)
KmlLink createLink (string id)
KmlGroundOverlay createGroundOverlay (string id)
KmlNetworkLink createNetworkLink (string id)
KmlScreenOverlay createScreenOverlay (string id)
KmlMultiGeometry createMultiGeometry (string id)
KmlStyleMap createStyleMap (string id)
KmlLookAt createLookAt (string id)
KmlCamera createCamera (string id)
GEFeatureBalloon createFeatureBalloon (string id)
GEHtmlStringBalloon createHtmlStringBalloon (string id)
GEHtmlDivBalloon createHtmlDivBalloon (string id)
Events


void frameend ()
void balloonclose ()

Public Attributes

Enums and Constants


readonly KmlAltitudeModeEnum ALTITUDE_CLAMP_TO_GROUND
readonly KmlAltitudeModeEnum ALTITUDE_RELATIVE_TO_GROUND
readonly KmlAltitudeModeEnum ALTITUDE_ABSOLUTE
readonly KmlAltitudeModeEnum ALTITUDE_CLAMP_TO_SEA_FLOOR
readonly KmlAltitudeModeEnum ALTITUDE_RELATIVE_TO_SEA_FLOOR
readonly KmlRefreshModeEnum REFRESH_ON_CHANGE
readonly KmlRefreshModeEnum REFRESH_ON_INTERVAL
readonly KmlRefreshModeEnum REFRESH_ON_EXPIRE
readonly KmlViewRefreshModeEnum VIEW_REFRESH_NEVER
readonly KmlViewRefreshModeEnum VIEW_REFRESH_ON_STOP
readonly KmlViewRefreshModeEnum VIEW_REFRESH_ON_REGION
readonly KmlUnitsEnum UNITS_FRACTION
readonly KmlUnitsEnum UNITS_PIXELS
readonly KmlUnitsEnum UNITS_INSET_PIXELS
readonly KmlColorModeEnum COLOR_NORMAL
readonly KmlColorModeEnum COLOR_RANDOM
readonly KmlColorModeEnum COLOR_INHERIT
readonly GEMapTypeEnum MAP_TYPE_EARTH
readonly GEMapTypeEnum MAP_TYPE_SKY
readonly GEVisibilityEnum VISIBILITY_HIDE
readonly GEVisibilityEnum VISIBILITY_SHOW
readonly GEVisibilityEnum VISIBILITY_AUTO
readonly double SPEED_TELEPORT
readonly string LAYER_TERRAIN
readonly string LAYER_ROADS
readonly string LAYER_BUILDINGS
readonly string LAYER_BUILDINGS_LOW_RESOLUTION
readonly string LAYER_BORDERS
readonly GEHitTestModeEnum HIT_TEST_GLOBE
readonly GEHitTestModeEnum HIT_TEST_TERRAIN
readonly GEHitTestModeEnum HIT_TEST_BUILDINGS
readonly KmlListItemTypeEnum LIST_ITEM_CHECK
readonly KmlListItemTypeEnum LIST_ITEM_CHECK_OFF_ONLY
readonly KmlListItemTypeEnum LIST_ITEM_CHECK_HIDE_CHILDREN
readonly KmlListItemTypeEnum LIST_ITEM_RADIO_FOLDER

Detailed Description

The GEPlugin is the Google Earth Plug-in's main object, and this is the object that is returned to the JavaScript application when you first create a plug-in instance. GEPlugin provides factory methods for ructing other objects (placemarks, and so on), and is also used to retrieve the root document objects.

Member Function Documentation

KmlObject GEPlugin.parseKml ( string  kml  ) 

Parse a string of KML and return a handle to the root of the KML object structure that was created.

KmlPlacemark GEPlugin.createPlacemark ( string  id  ) 

Creates a placemark on the globe. A Placemark is a feature with associated Geometry. A Placemark with a Point has an icon associated with it that marks a point on the Earth in the 3D viewer. (In the Google Earth 3D viewer, a Point Placemark is the only object you can click or roll over. Other Geometry objects do not have an icon in the 3D viewer. To allow the user to click in the 3D viewer, you would need to create a MultiGeometry object that contains both a Point and the other Geometry object.)

Parameters:
id ID of placemark.

KmlPoint GEPlugin.createPoint ( string  id  ) 

Creates a point on the globe. Specifies the geographic location defined by longitude, latitude, and (optional) altitude.

Parameters:
id ID of new location

KmlLineString GEPlugin.createLineString ( string  id  ) 

Creates a line string on Google Earth.

Parameters:
id location of the new string.

KmlFolder GEPlugin.createFolder ( string  id  ) 

Creates a folder. A KMLFolder is used to arrange other features hierarchically (Folders, Placemarks, NetworkLinks, or Overlays). A feature is visible only if it and all its ancestors are visible.

Parameters:
id ID of the new folder

KmlLod GEPlugin.createLod ( string  id  ) 

Creates level of detail (LOD). LOD describes the size of the projected region on the screen that is required in order for the region to be considered active. Also specifies the size of the pixel ramp used for fading in (from transparent to opaque) and fading out (from opaque to transparent).

Parameters:
id ID of the new LOD.

KmlLatLonBox GEPlugin.createLatLonBox ( string  id  ) 

Creates a LatLonBox, a bounding box that describes an area of interest defined by geographic coordinates and altitudes.

Parameters:
id ID of the new LatLonBox

KmlLatLonAltBox GEPlugin.createLatLonAltBox ( string  id  ) 

Creates a LatLonAltBox, a bounding box that describes an area of interest defined by geographic coordinates and altitudes.

Parameters:
id ID of the new LatLonAltBox

KmlDocument GEPlugin.createDocument ( string  id  ) 

Creates a Document. A Document is a container for features and styles.

Parameters:
id ID of the new KML document.

KmlRegion GEPlugin.createRegion ( string  id  ) 

Creates a Region in Google Earth. A Region contains a bounding box that describes an area of interest defined by geographic coordinates and altitudes.

Parameters:
id ID of the new KML region.

KmlLocation GEPlugin.createLocation ( string  id  ) 

Specifies the exact coordinates of the Model's origin in latitude, longitude, and altitude. Latitude and longitude measurements are standard lat-lon projection with WGS84 datum. Altitude is distance above the earth's surface, in meters, and is interpreted according to altitudeMode.

Parameters:
id ID of the new KML location.

KmlOrientation GEPlugin.createOrientation ( string  id  ) 

Sets the rotation of a 3D model's coordinate system to position the object in Google Earth.

Parameters:
id ID of the new KMLOrientation.

KmlScale GEPlugin.createScale ( string  id  ) 

Sets the scale of a model along the x, y, and z axes in the model's coordinate space.

Parameters:
id ID of KmlScale.

KmlModel GEPlugin.createModel ( string  id  ) 

Creates a model. A model is a 3D object described in a COLLADA file. COLLADA files have a .dae file extension. Models are created in their own coordinate space and then located, positioned, and scaled in Google Earth.

Parameters:
id ID of the new KmlModel.

KmlStyle GEPlugin.createStyle ( string  id  ) 

A Style defines an addressable style group that can be referenced by StyleMaps and features.

Parameters:
id ID of the new KMLStyle object.

KmlLinearRing GEPlugin.createLinearRing ( string  id  ) 

Creates a LinearRing. A LinearRing defines a closed line string, typically the outer boundary of a Polygon. Optionally, a LinearRing can also be used as the inner boundary of a Polygon to create holes in the Polygon.

Parameters:
id ID of the new KmlLinearRing.

KmlPolygon GEPlugin.createPolygon ( string  id  ) 

Creates a Polygon. A Polygon is defined by an outer boundary and 0 or more inner boundaries.

Parameters:
id ID of the new Polygon.

KmlIcon GEPlugin.createIcon ( string  id  ) 

Creates an Icon. An icon defines an image associated with an Icon style or overlay.

Parameters:
id ID of the new KmlIcon.

KmlLink GEPlugin.createLink ( string  id  ) 

Creates a Link. A Link specifies the location of KML files fetched by network links, image files used in any overlay, or model files used with the Model object.

Parameters:
id ID of the new KmlLink.

KmlGroundOverlay GEPlugin.createGroundOverlay ( string  id  ) 

Creates a GroundOverlay. A GroundOverlay draws an image overlay draped onto the terrain.

Parameters:
id ID of the new KmlGroundOverlay.

KmlNetworkLink GEPlugin.createNetworkLink ( string  id  ) 

Creates a NetworkLink. A NetworkLink references a KML file or KMZ archive on a local or remote network.

Parameters:
id ID of the new KmlNetworkLink.

KmlScreenOverlay GEPlugin.createScreenOverlay ( string  id  ) 

Creates a ScreenOverlay. A ScreenOverlay draws an image overlay fixed to the screen.

Parameters:
id ID of the new KmlScreenOverlay.

KmlMultiGeometry GEPlugin.createMultiGeometry ( string  id  ) 

Creates a container for one or more geometry primitives associated with the same feature.

Parameters:
id ID of the new KmlMultiGeometry container.

KmlStyleMap GEPlugin.createStyleMap ( string  id  ) 

Creates a StyleMap. A StyleMap maps between two different icon styles. Typically, a StyleMap is used to provide separate normal and highlighted styles for a Placemark, so that the highlighted version appears when the user mouses over the icon in Google Earth.

KmlLookAt GEPlugin.createLookAt ( string  id  ) 

Creates a new LookAt. A LookAt element positions the camera view in relation to an object that is being viewed.

KmlCamera GEPlugin.createCamera ( string  id  ) 

Creates a new Camera. This element positions the camera relative to the Earth's surface and defines the view direction.

GEFeatureBalloon GEPlugin.createFeatureBalloon ( string  id  ) 

Creates a Feature balloon.

Parameters:
id ID of GEFeatureBalloon.

GEHtmlStringBalloon GEPlugin.createHtmlStringBalloon ( string  id  ) 

Creates an HTML string balloon.

Parameters:
id ID of GEHtmlStringBalloon.

GEHtmlDivBalloon GEPlugin.createHtmlDivBalloon ( string  id  ) 

Creates an Html Div Balloon.

Parameters:
id ID of GEHtmlDivBalloon.

GEAbstractBalloon GEPlugin.getBalloon (  ) 

Returns the currently active balloon, or null.

void GEPlugin.setBalloon ( GEAbstractBalloon  newActiveBalloon  ) 

Sets the given balloon as the active balloon, replacing any existing active balloon. If the given feature is visible, then the balloon is displayed. Otherwise, the balloon is hidden.

If the argument is null, then any existing active balloon will be hidden.

string GEPlugin.getEarthVersion (  ) 

Used for debugging purposes; if this value is not equal to the value returned by getPluginVersion then there is a misconfiguration on the end user's system. This check is automatically done during plugin instantiation.

string GEPlugin.getPluginVersion (  ) 

The version of the Google Earth Plug-in installed on the end user's machine.

string GEPlugin.getApiVersion (  ) 

The version of the JavaScript API that the Google Earth Plug-in installed on the end user's machine is capable of interfacing with.

GEOptions GEPlugin.getOptions (  ) 

The options used to manipulate the behavior of the Google Earth plugin.

GEWindow GEPlugin.getWindow (  ) 

Controls the window options.

GEGlobe GEPlugin.getGlobe (  ) 

Controls the globe behavior.

GESun GEPlugin.getSun (  ) 

Displays the dawn to dusk views.

KmlLayerRoot GEPlugin.getLayerRoot (  ) 

Controls built-in layer behavior.

GEView GEPlugin.getView (  ) 

Controls the plugin viewport.

GENavigationControl GEPlugin.getNavigationControl (  ) 

Controls the navigation controls on the globe.

GEFeatureContainer GEPlugin.getFeatures (  ) 

The top-level features currently in the Earth object.

GETourPlayer GEPlugin.getTourPlayer (  ) 

Exposes functionality for interacting with KML tours.

GEPhotoOverlayViewer GEPlugin.getPhotoOverlayViewer (  ) 

Exposes functionality for interacting with photo overlays.

float GEPlugin.getStreamingPercent (  ) 

Returns a number between 0 and 100 (inclusive) that indicates the progress of the streaming of imagery for the current view.

A value of 100 means that the imagery is completely streamed in.

void GEPlugin.frameend (  ) 

Event fired when Earth has finished rendering the viewport. This event will be called many times in succession when the viewport is changing. Add a listener for this event and make incremental changes to the viewport for smooth animation.

void GEPlugin.balloonclose (  ) 

Event fired when the current balloon is closed.


Member Data Documentation

readonly KmlAltitudeModeEnum GEPlugin.ALTITUDE_CLAMP_TO_GROUND

Specifies that altitudes are at ground level. For Ground overlays, this means that the image will be draped over the terrain.

readonly KmlAltitudeModeEnum GEPlugin.ALTITUDE_RELATIVE_TO_GROUND

Specifies that altitudes are to be interpreted as meters above or below ground level (i.e. the elevation of the terrain at the location).

readonly KmlAltitudeModeEnum GEPlugin.ALTITUDE_ABSOLUTE

Specifies that altitudes are to be interpreted as meters above or below sea level, regardless of the actual elevation of the terrain beneath the object. For example, if you set the altitude of an object to 10 meters with an absolute altitude mode, the object will appear to be at ground level if the terrain beneath is also 10 meters above sea level. If the terrain is 3 meters above sea level, the object will appear elevated above the terrain by 7 meters. If, on the other hand, the terrain is 15 meters above sea level, the object may be completely invisible.

readonly KmlAltitudeModeEnum GEPlugin.ALTITUDE_CLAMP_TO_SEA_FLOOR

Specifies that altitudes are at sea floor level.

readonly KmlAltitudeModeEnum GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR

Specifies that altitudes are to be interpreted as meters above sea floor (i.e. the elevation of the sea floor at the location).

readonly KmlRefreshModeEnum GEPlugin.REFRESH_ON_CHANGE

Refresh when the file is loaded and whenever the Link parameters change. This refresh mode is the default.

readonly KmlRefreshModeEnum GEPlugin.REFRESH_ON_INTERVAL

Refresh every n seconds (specified in refreshInterval).

readonly KmlRefreshModeEnum GEPlugin.REFRESH_ON_EXPIRE

Refresh when the expiration time is reached. If a fetched file has a NetworkLinkControl, the expires time takes precedence over expiration times specified in HTTP headers. If no expires time is specified, the HTTP max-age header is used (if present). If max-age is not present, the Expires HTTP header is used (if present).

readonly KmlViewRefreshModeEnum GEPlugin.VIEW_REFRESH_NEVER

Ignore changes in the view. Also ignore viewFormat parameters, if any. This view refresh mode is the default.

readonly KmlViewRefreshModeEnum GEPlugin.VIEW_REFRESH_ON_STOP

Refresh n seconds after movement stops, where n is specified in viewRefreshTime.

readonly KmlViewRefreshModeEnum GEPlugin.VIEW_REFRESH_ON_REGION

Refresh only when the feature's Region becomes active.

readonly KmlUnitsEnum GEPlugin.UNITS_FRACTION

Screen coordinates are to be interpreted as a fraction of an item, like an image or Google Earth window.

readonly KmlUnitsEnum GEPlugin.UNITS_PIXELS

Screen coordinates are to be interpreted as pixels from the left or bottom edge.

readonly KmlUnitsEnum GEPlugin.UNITS_INSET_PIXELS

Screen coordinates are to be interpreted as pixels from the top or right edge.

readonly KmlColorModeEnum GEPlugin.COLOR_NORMAL

Apply no color mode effect, i.e. use the base color as is.

readonly KmlColorModeEnum GEPlugin.COLOR_RANDOM

Apply a random linear scale to the base color. See the KML <colorMode> documentation for more details.

readonly KmlColorModeEnum GEPlugin.COLOR_INHERIT

Inherit the color mode from ancestor styles.

readonly GEMapTypeEnum GEPlugin.MAP_TYPE_EARTH

The Earth map type, used with GEOptions' setMapType

readonly GEMapTypeEnum GEPlugin.MAP_TYPE_SKY

The Sky map type, used with GEOptions' setMapType

readonly GEVisibilityEnum GEPlugin.VISIBILITY_HIDE

Hide the navigation control.

readonly GEVisibilityEnum GEPlugin.VISIBILITY_SHOW

Show the navigation control always.

readonly GEVisibilityEnum GEPlugin.VISIBILITY_AUTO

Automatically show or hide the navigation control depending on user interaction.

readonly double GEPlugin.SPEED_TELEPORT

Specifies that fly-to should happen immediately, without a smooth transition.

readonly string GEPlugin.LAYER_TERRAIN

The Layer ID of the terrain layer. Use as an argument to getLayerById() or enableLayerById().

readonly string GEPlugin.LAYER_ROADS

The Layer ID of the roads layer. Use as an argument to getLayerById() or enableLayerById().

readonly string GEPlugin.LAYER_BUILDINGS

The Layer ID of the photorealistic buildings layer. Use as an argument to getLayerById() or enableLayerById().

The Layer ID of the low resolution (gray) buildings layer. Use as an argument to getLayerById() or enableLayerById(). Note that as photorealistic buildings continue to be created and added to the LAYER_BUILDINGS layer, the low-resolution version of those buildings will be removed from this layer. This layer will therefore change over time.

readonly string GEPlugin.LAYER_BORDERS

The Layer ID of the borders layer. Use as an argument to getLayerById() or enableLayerById().

readonly GEHitTestModeEnum GEPlugin.HIT_TEST_GLOBE

When using the GEView.hitTest method, this mode samples the globe (the earth's sphere at altitude 0, without terrain or buildings).

readonly GEHitTestModeEnum GEPlugin.HIT_TEST_TERRAIN

When using the GEView.hitTest method, this mode samples the earth's terrain (the ground surface, including variations in altitude).

readonly GEHitTestModeEnum GEPlugin.HIT_TEST_BUILDINGS

When using the GEView.hitTest method, this mode samples 3D buildings.

readonly KmlListItemTypeEnum GEPlugin.LIST_ITEM_CHECK

The feature's visibility is tied to its list item's checkbox state.

readonly KmlListItemTypeEnum GEPlugin.LIST_ITEM_CHECK_OFF_ONLY

When specified for a folder, document or network link, prevents all items from being made visible at once—that is, the user can turn all children off but cannot turn them all on at the same time. This setting is useful for containers or network links containing large amounts of data.

readonly KmlListItemTypeEnum GEPlugin.LIST_ITEM_CHECK_HIDE_CHILDREN

Use a normal checkbox for visibility but do not display children in a list view. The item's checkbox should allows the user to toggle visibility of the child objects in the viewport.

readonly KmlListItemTypeEnum GEPlugin.LIST_ITEM_RADIO_FOLDER

When specified for a container (a folder or a document), only one of the container's items should be visible at a time.