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 ()
GETime getTime ()
GEWindow getWindow ()
GEGlobe getGlobe ()
GESun getSun ()
KmlLayerRoot getLayerRoot ()
GEView getView ()
GENavigationControl getNavigationControl ()
GEFeatureContainer getFeatures ()
GETourPlayer getTourPlayer ()
GEPhotoOverlayViewer getPhotoOverlayViewer ()
float getStreamingPercent ()
Object Creation Functions
KmlObject getElementById (string url)
KmlObject getElementByUrl (string url)
KmlObjectList getElementsByType (string type)
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)
KmlTour createTour (string id)
KmlPhotoOverlay createPhotoOverlay (string id)
KmlViewerOptions createViewerOptions (string id)
KmlCoord createCoord ()
KmlObjectBase createElement (string tagName, string id)
KmlTimeStamp createTimeStamp (string id)
KmlTimeSpan createTimeSpan (string id)
GEFeatureBalloon createFeatureBalloon (string id)
GEHtmlStringBalloon createHtmlStringBalloon (string id)
GEHtmlDivBalloon createHtmlDivBalloon (string id)
Events
void frameend ()
void balloonclose ()
void balloonopening (KmlBalloonOpeningEvent event)

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_REQUEST
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 GEEventPhaseEnum EVENT_CAPTURING_PHASE
readonly GEEventPhaseEnum EVENT_AT_TARGET_PHASE
readonly GEEventPhaseEnum EVENT_BUBBLING_PHASE
readonly string LAYER_TERRAIN
readonly string LAYER_ROADS
readonly string LAYER_BUILDINGS
readonly string LAYER_BUILDINGS_LOW_RESOLUTION
readonly string LAYER_BORDERS
readonly string LAYER_TREES
readonly GEHitTestModeEnum HIT_TEST_GLOBE
readonly GEHitTestModeEnum HIT_TEST_TERRAIN
readonly GEHitTestModeEnum HIT_TEST_BUILDINGS
readonly GEViewerOptionsValueEnum OPTION_STATE_DEFAULT
readonly GEViewerOptionsValueEnum OPTION_STATE_ENABLED
readonly GEViewerOptionsValueEnum OPTION_STATE_DISABLED
readonly GEViewerOptionsTypeEnum OPTION_SUNLIGHT
readonly GEViewerOptionsTypeEnum OPTION_HISTORICAL_IMAGERY
readonly GEViewerOptionsTypeEnum OPTION_STREET_VIEW
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
readonly GENavigationControlEnum NAVIGATION_CONTROL_LARGE
readonly GENavigationControlEnum NAVIGATION_CONTROL_SMALL

Detailed Description

The GEPlugin is the Google Earth Plugin'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.

Get an element by ID. This is functionally equivalent to getElementByUrl with an unspecified base URL. For example, getElementByUrl('#foo'). Usage is when finding objects created with JavaScript, which have unspecified base URLs. The object must be a descendant of the DOM before it can be found.

Get an element by URL. A URL consists of the base address and the ID, joined with the # character. For example:

   http://www.google.com/bar.kml#here_be_monsters

This applies to objects that are fetched. In the case of plugin created objects, the URL is simply #foo. The object must be a descendant of the DOM before it can be found.

Get a list of elements by type.

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:
idID of placemark.

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

Parameters:
idID of new location

Creates a line string on Google Earth.

Parameters:
idlocation of the new string.

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:
idID 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:
idID of the new LOD.

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

Parameters:
idID of the new LatLonBox

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

Parameters:
idID of the new LatLonAltBox

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

Parameters:
idID of the new KML document.

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:
idID of the new KML region.

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:
idID of the new KML location.

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

Parameters:
idID of the new KMLOrientation.

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

Parameters:
idID of KmlScale.

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:
idID of the new KmlModel.

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

Parameters:
idID of the new KMLStyle object.

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:
idID of the new KmlLinearRing.

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

Parameters:
idID 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:
idID 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:
idID of the new KmlLink.

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

Parameters:
idID of the new KmlGroundOverlay.

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

Parameters:
idID of the new KmlNetworkLink.

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

Parameters:
idID of the new KmlScreenOverlay.

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

Parameters:
idID of the new KmlMultiGeometry container.

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.

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

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

Creates a new viewer options object.

Create a KmlTimeStamp object. For more information, refer to the Time chapter of the Google Earth API developer's guide.

Create a KmlTimeSpan object. For more information, refer to the Time chapter of the Google Earth API developer's guide.

Creates a Feature balloon.

Parameters:
idID of GEFeatureBalloon.

Creates an HTML string balloon.

Parameters:
idID of GEHtmlStringBalloon.

Creates an Html Div Balloon.

Parameters:
idID of GEHtmlDivBalloon.

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.

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.

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

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

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

The time class used to manipulate the behavior of the Google Earth plugin time.

Controls the window options.

Controls the globe behavior.

Displays the dawn to dusk views.

Controls built-in layer behavior.

Controls the plugin viewport.

Controls the navigation controls on the globe.

The top-level features currently in the Earth object.

Exposes functionality for interacting with KML tours.

Exposes functionality for interacting with photo overlays.

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.

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.

Event fired when the current balloon is closed.

Event fired when a balloon is about to open.

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_REQUEST

Refresh the file only when the user explicitly requests it.

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 UI element.

readonly GEVisibilityEnum GEPlugin.VISIBILITY_SHOW

Show the UI element always.

readonly GEVisibilityEnum GEPlugin.VISIBILITY_AUTO

Automatically show or hide the UI element 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 string GEPlugin.LAYER_TREES

The Layer ID of the trees 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 GEViewerOptionsValueEnum GEPlugin.OPTION_STATE_DEFAULT

Sets the render state to its default value. Currently, sunlight, Street View, and historical imagery all default to a disabled state.

Passed to the KmlViewerOptions.setOption method.

readonly GEViewerOptionsValueEnum GEPlugin.OPTION_STATE_ENABLED

Set the render state to on. Passed to the KmlViewerOptions.setOption method.

readonly GEViewerOptionsValueEnum GEPlugin.OPTION_STATE_DISABLED

Set the render state to off. Passed to the KmlViewerOptions.setOption method.

readonly GEViewerOptionsTypeEnum GEPlugin.OPTION_SUNLIGHT

Passed to the KmlViewerOptions.setOption method, along with a GEViewerOptionsValueEnum, to specify whether the Sun option should be visible. Sun can also be enabled/disabled with GEPlugin.getSun.

readonly GEViewerOptionsTypeEnum GEPlugin.OPTION_HISTORICAL_IMAGERY

Passed to the KmlViewerOptions.setOption method, along with a GEViewerOptionsValueEnum, to specify whether historical imagery should be enabled.

readonly GEViewerOptionsTypeEnum GEPlugin.OPTION_STREET_VIEW

Passed to the KmlViewerOptions.setOption method, along with a GEViewerOptionsValueEnum, to specify whether Street View should be enabled when the view reaches ground level. Note that this applies only to programmatic movement, such as fly-tos; to control whether the user can enter Street View using manual navigation controls, call ge.getPlugin().streetViewEnabled(true).

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.

readonly GENavigationControlEnum GEPlugin.NAVIGATION_CONTROL_LARGE

The large navigation control type, used with GENavigationControl.setControlType().

readonly GENavigationControlEnum GEPlugin.NAVIGATION_CONTROL_SMALL

The small navigation control type, used with GENavigationControl.setControlType().

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.