View source code of the function ge_text() in the MATLAB editor
Google Earth toolbox contents


Adds text labels to the GoogleEarth visualization.

Syntaxgo to top

kmlStr = ge_text(X,Y,Z,'S')
kmlStr = ge_plot(X,Y,Z,'S',Parameter,Value)

Descriptiongo to top

kmlStr = ge_text(X,Y,Z,'S')

Places the string argument 'S' at location specified by X (longitude), Y (latitude), and Z (altitude).

kmlStr = ge_text(X,Y,Z,'S',Parameter,Value)

Some options can be used in combination with ge_text. Assigning values to the parameters is accomplished by inclusion of an alternating sequence of parameters and their value. The table below provides an overview of the authorized options. The order in which the parameters are included does not matter. Please be aware that the options are case-sensitive. Examples are provided further down.

'altitude'Height difference relative to the plane of reference (see parameter 'altitudeMode').
'altitudeMode'Specifies which plane of reference to use. Must be one of 'absolute', 'relativeToGround' or 'clampToGround'.
'description'A description of the object can be included using this parameter. Its value must be passed as a character array. Including a description will cause a text balloon to pop up from the map at the object's location. This balloon contains the character array included in 'description'.
'msgToScreen'Defines whether verbose feedback is provided by the function when it is accessed and when it finishes. Default is false (which is equivalent to logical(0), but quicker).
'snippet'A short description of the feature. In Google Earth, this description is displayed in the Places panel under the name of the feature. If a Snippet is not supplied, the first two lines of the description are used
'timeSpanStart'See Dynamic visualization.
'timeSpanStop'See Dynamic visualization.
'visibility'Defines whether the object is visible. Must be passed as numerical value 1 or 0.

Remarksgo to top

Latitudes on the Southern hemisphere should be passed to ge_text() as negative values. Same for longitudes on the Western hemisphere.

Latitudes and longitudes should be passed in units of decimal degrees (also known as fractional degrees). Google Earth uses Simple Cylindrical projection (also known as Plate Carée) with a WGS84 datum. Altitudes are in meters.

A line can consist of multiple sections; these will all be assigned identical properties such as line width and color. When different lines should be assigned different line styles, use multiple calls to ge_plot() with different line style parameters. Disconnected lines with identical linestyles can be generated using coordinate vectors separated by NaNs.

Examplesgo to top

See the demo file demo_ge_text for more details.