Constructor
new GeographicText(position, text)
Constructs a geographic text shape at a specified position.
Parameters:
Name | Type | Description |
---|---|---|
position |
Position | The text's geographic position. |
text |
String | The text to display. |
- Source:
Throws:
-
If either the specified position or text is null or undefined.
- Type
- ArgumentError
Extends
Members
altitudeMode
This text's altitude mode. May be one of
- WorldWind.ABSOLUTE
- WorldWind.RELATIVE_TO_GROUND
- WorldWind.CLAMP_TO_GROUND
- Inherited From:
- Default Value:
- WorldWind.ABSOLUTE
- Source:
alwaysOnTop :Boolean
Indicates whether this text has visual priority over other shapes in the scene.
Type:
- Boolean
- Inherited From:
- Default Value:
- false
- Source:
attributes :TextAttributes
The text's attributes. If null and this text is not highlighted, this text is not drawn.
Type:
- Inherited From:
- Default Value:
- see TextAttributes
- Source:
(readonly) currentVisibility :Number
This shape's current visibility, a value between 0 and 1. This property scales the shape's effective
opacity. It is incremented or decremented each frame according to the draw context's
fade velocity property in order to achieve this shape's current
target visibility. This current visibility and target visibility are
used to control the fading in and out of this shape.
Type:
- Number
- Inherited From:
- Default Value:
- 1
- Source:
declutterGroup :Number
Indicates the group ID of the declutter group to include this Text shape. This shape
is decluttered relative to all other shapes within its group by the default
declutter filter. To prevent decluttering of this shape, set its
declutter group to 0.
Type:
- Number
- Overrides:
- Default Value:
- 1
- Source:
displayName :String
The display name of the renderable.
Type:
- String
- Inherited From:
- Default Value:
- "Renderable"
- Source:
enabled :boolean
Indicates whether this text is drawn.
Type:
- boolean
- Inherited From:
- Default Value:
- true
- Source:
highlightAttributes :TextAttributes
The attributes used when this text's highlighted flag is true. If null and the
highlighted flag is true, this text's normal attributes are used. If they, too, are null, this
text is not drawn.
Type:
- Inherited From:
- Default Value:
- null
- Source:
highlighted :boolean
Indicates whether this text uses its highlight attributes rather than its normal attributes.
Type:
- boolean
- Inherited From:
- Default Value:
- false
- Source:
markerImageScale :Number
The scale to apply to the markerImageSource.
Type:
- Number
- Inherited From:
- Default Value:
- 0.1
- Source:
markerImageSource :String
The image to display when this text shape is eliminated from the scene due to decluttering.
Type:
- String
- Inherited From:
- Default Value:
- A round dot drawn in this shape's text color.
- Source:
pickDelegate :Object
Indicates the object to return as the userObject of this text when picked. If null,
then this text object is returned as the userObject.
Type:
- Object
- Inherited From:
- Default Value:
- null
- Source:
- See:
position :Position
This text's geographic position.
The TextAttributes.offset property indicates the relationship of the
text string to this position.
Type:
- Source:
(readonly) screenBounds :Rectangle
Indicates the screen coordinate bounds of this shape during ordered rendering.
Type:
- Inherited From:
- Source:
targetVisibility :Number
This shape's target visibility, a value between 0 and 1. During ordered rendering this shape modifies its
current visibility towards its target visibility at the rate
specified by the draw context's fadeVelocity property. The target
visibility and current visibility are used to control the fading in and out of this shape.
Type:
- Number
- Inherited From:
- Default Value:
- 1
- Source:
text :String
This shape's text. If null or empty, no text is drawn.
Type:
- String
- Inherited From:
- Default Value:
- null
- Source:
userProperties :Object
An application defined object associated with this renderable. A typical use case is to associate
application defined data with a picked renderable.
Type:
- Object
- Inherited From:
- Default Value:
- An empty object
- Source:
Methods
clone() → {GeographicText}
Creates a new geographic text object that is a copy of this one.
- Source:
Returns:
The new geographic text object.
- Type
- GeographicText
(protected) computeScreenPointAndEyeDistance(dc) → {Boolean}
Computes this shape's screen point and eye distance. Subclasses must override this method.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Overrides:
- Source:
Returns:
true if the screen point can be computed, otherwise false.
- Type
- Boolean
copy(that)
Copies the contents of a specified text object to this text object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Text | The text object to copy. |
- Inherited From:
- Source:
render(dc)
Renders this text. This method is typically not called by applications but is called by
RenderableLayer during rendering. For this shape this method creates and
enques an ordered renderable with the draw context and does not actually draw the text.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Overrides:
- Source:
renderOrdered(dc)
Draws this shape as an ordered renderable. Applications do not call this function. It is called by
WorldWindow during rendering. Implements the OrderedRenderable interface.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Inherited From:
- Source: