Constructor
new Placemark(position, eyeDistanceScaling, attributes)
Constructs a placemark.
Parameters:
Name | Type | Description |
---|---|---|
position |
Position | The placemark's geographic position. |
eyeDistanceScaling |
Boolean | Indicates whether the size of this placemark scales with eye distance. See eyeDistanceScalingThreshold and eyeDistanceScalingLabelThreshold. |
attributes |
PlacemarkAttributes | The attributes to associate with this placemark. May be null, in which case default attributes are associated. |
- Source:
Throws:
-
If the specified position is null or undefined.
- Type
- ArgumentError
Extends
Members
altitudeMode
This placemark's altitude mode. May be one of
- WorldWind.ABSOLUTE
- WorldWind.RELATIVE_TO_GROUND
- WorldWind.CLAMP_TO_GROUND
- Default Value:
- WorldWind.ABSOLUTE
- Source:
alwaysOnTop :Boolean
Indicates whether this placemark has visual priority over other shapes in the scene.
Type:
- Boolean
- Default Value:
- false
- Source:
attributes :PlacemarkAttributes
The placemark's attributes. If null and this placemark is not highlighted, this placemark is not
drawn.
Type:
- Default Value:
- Source:
(readonly) currentVisibility :Number
This placemark's current label visibility, a value between 0 and 1. This property scales the placemark's
effective label opacity. It is incremented or decremented each frame according to the draw context's
fade time property in order to achieve this placemark's
target visibility. This current visibility and target visibility are
used to control the fading in and out of this placemark's label.
Type:
- Number
- Default Value:
- 1
- Source:
declutterGroup :Number
Indicates the group ID of the declutter group to include this placemark. If non-zero, this placemark
is decluttered relative to all other shapes within its group.
Type:
- Number
- Default Value:
- 2
- Source:
displayName :String
The display name of the renderable.
Type:
- String
- Inherited From:
- Default Value:
- "Renderable"
- Source:
enabled :Boolean
Indicates whether to display this renderable.
Type:
- Boolean
- Overrides:
- Default Value:
- true
- Source:
enableLeaderLinePicking :Boolean
Indicates whether this placemark's leader line, if any, is pickable.
Type:
- Boolean
- Default Value:
- false
- Source:
eyeDistanceScaling :Boolean
Indicates whether this placemark's size is reduced at higher eye distances. If true, this placemark's
size is scaled inversely proportional to the eye distance if the eye distance is greater than the
value of the eyeDistanceScalingThreshold property.
When the eye distance is below the threshold, this placemark is scaled only according to the
imageScale.
Type:
- Boolean
- Source:
eyeDistanceScalingLabelThreshold :number
The eye altitude above which this placemark's label is not displayed.
Type:
- number
- Source:
eyeDistanceScalingThreshold :Number
The eye distance above which to reduce the size of this placemark, in meters. If
eyeDistanceScaling is true, this placemark's image, label and leader
line sizes are reduced as the eye distance increases beyond this threshold.
Type:
- Number
- Default Value:
- 1e6 (meters)
- Source:
highlightAttributes :PlacemarkAttributes
The attributes used when this placemark's highlighted flag is true. If null and the
highlighted flag is true, this placemark's normal attributes are used. If they, too, are null, this
placemark is not drawn.
Type:
- Default Value:
- null
- Source:
highlighted :Boolean
Indicates whether this placemark uses its highlight attributes rather than its normal attributes.
Type:
- Boolean
- Default Value:
- false
- Source:
imageRotation :Number
The amount of rotation to apply to the image, measured in degrees clockwise and relative to this
placemark's imageRotationReference.
Type:
- Number
- Default Value:
- 0
- Source:
imageRotationReference :String
Indicates whether to apply this placemark's image rotation relative to the screen or the globe.
If WorldWind.RELATIVE_TO_SCREEN, this placemark's image is rotated in the plane of the screen and
its orientation relative to the globe changes as the view changes.
If WorldWind.RELATIVE_TO_GLOBE, this placemark's image is rotated in a plane tangent to the globe
at this placemark's position and retains its orientation relative to the globe.
Type:
- String
- Default Value:
- WorldWind.RELATIVE_TO_SCREEN
- Source:
imageTilt :Number
The amount of tilt to apply to the image, measured in degrees away from the eye point and relative
to this placemark's imageTiltReference. While any positive or
negative number may be specified, values outside the range [0. 90] cause some or all of the image to
be clipped.
Type:
- Number
- Default Value:
- 0
- Source:
imageTiltReference :string
Indicates whether to apply this placemark's image tilt relative to the screen or the globe.
If WorldWind.RELATIVE_TO_SCREEN, this placemark's image is tilted inwards (for positive tilts)
relative to the plane of the screen, and its orientation relative to the globe changes as the view
changes. If WorldWind.RELATIVE_TO_GLOBE, this placemark's image is tilted towards the globe's surface,
and retains its orientation relative to the surface.
Type:
- string
- Default Value:
- WorldWind.RELATIVE_TO_SCREEN
- Source:
label :String
This placemark's textual label. If null, no label is drawn.
Type:
- String
- Default Value:
- null
- Source:
pickDelegate :Object
Indicates the object to return as the userObject of this shape when picked. If null,
then this shape is returned as the userObject.
Type:
- Object
- Overrides:
- Default Value:
- null
- Source:
- See:
position :Position
This placemark's geographic position.
Type:
- Source:
(readonly) screenBounds :Rectangle
Indicates the screen coordinate bounds of this shape during ordered rendering.
Type:
- Source:
targetVisibility :Number
This placemark's target label visibility, a value between 0 and 1. During ordered rendering this
placemark modifies its current visibility towards its target
visibility at the rate specified by the draw context's fade time property.
The target visibility and current visibility are used to control the fading in and out of this
placemark's label.
Type:
- Number
- Default Value:
- 1
- Source:
updateImage :Boolean
Indicates whether this placemark's image should be re-retrieved even if it has already been retrieved.
Set this property to true when the image has changed but has the same image path.
The property is set to false when the image is re-retrieved.
Type:
- Boolean
- 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() → {Placemark}
Creates a new placemark that is a copy of this placemark.
- Source:
Returns:
The new placemark.
- Type
- Placemark
copy(that)
Copies the contents of a specified placemark to this placemark.
Parameters:
Name | Type | Description |
---|---|---|
that |
Placemark | The placemark to copy. |
- Source:
render(dc)
Renders this placemark. 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 placemark.
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.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Source: