Class: PlacemarkAttributes

PlacemarkAttributes(attributes)

Holds attributes applied to Placemark shapes.

Constructor

new PlacemarkAttributes(attributes)

Constructs a placemark attributes bundle. The defaults indicate a placemark displayed as a white 1x1 pixel square centered on the placemark's geographic position.
Parameters:
Name Type Description
attributes PlacemarkAttributes Attributes to initialize this attributes instance to. May be null, in which case the new instance contains default attributes.
Source:

Members

depthTest :Boolean

Indicates whether the placemark should be depth-tested against other objects in the scene. If true, the placemark may be occluded by terrain and other objects in certain viewing situations. If false, the placemark will not be occluded by terrain and other objects. If this value is true, the placemark's label, if any, has an independent depth-test control. See PlacemarkAttributes.labelAttributes and TextAttributes.depthTest.
Type:
  • Boolean
Default Value:
  • true
Source:

drawLeaderLine :Boolean

Indicates whether to draw a line from the placemark's geographic position to the ground.
Type:
  • Boolean
Default Value:
  • false
Source:

imageColor :Color

The image color. When this attribute bundle has a valid image path the placemark's image is composed with this image color to achieve the final placemark color. Otherwise the placemark is drawn in this color. The color white, the default, causes the image to be drawn in its native colors.
Type:
Default Value:
  • White (1, 1, 1, 1)
Source:

imageOffset :Offset

Indicates the location within the placemark's image to align with the placemark's geographic position. May be null, in which case the image's bottom-left corner is placed at the geographic position.
Type:
Default Value:
  • 0.5, 0.5, both fractional (Centers the image on the geographic position.)
Source:

imageScale :Number

Indicates the amount to scale the placemark's image. When this attribute bundle has a valid image path the scale is applied to the image's dimensions. Otherwise the scale indicates the dimensions in pixels of a square drawn at the placemark's geographic position. A scale of 0 causes the placemark to disappear; however, the placemark's label, if any, is still drawn.
Type:
  • Number
Default Value:
  • 1
Source:

imageSource :String|ImageSource

The image source of the placemark's image. May be either a string giving the URL of the image, or an ImageSource object identifying an Image created dynamically. If null, the placemark is drawn as a square whose width and height are the value of this attribute object's imageScale property.
Type:
Default Value:
  • null
Source:

labelAttributes :TextAttributes

Indicates the attributes to apply to the placemark's label, if any. If null, the placemark's label is not drawn.
Type:
Default Value:
Source:

leaderLineAttributes :ShapeAttributes

The attributes to apply to the leader line if it's drawn. If null, the placemark's leader line is not drawn.
Type:
Default Value:
Source:

(readonly) stateKey :String

A string identifying the state of this attributes object. The string encodes the current values of all this object's properties. It's typically used to validate cached representations of shapes associated with this attributes object.
Type:
  • String
Source:

(protected) stateKeyInvalid :Boolean

Indicates whether this object's state key is invalid. Subclasses must set this value to true when their attributes change. The state key will be automatically computed the next time it's requested. This flag will be set to false when that occurs.
Type:
  • Boolean
Source:

Methods

(protected) computeStateKey() → {String}

Computes the state key for this attributes object. Subclasses that define additional attributes must override this method, call it from that method, and append the state of their attributes to its return value.
Source:
Returns:
The state key for this object.
Type
String