Constructor
new AnnotationAttributes(attributes)
Constructs an annotation attributes bundle.
Parameters:
Name | Type | Description |
---|---|---|
attributes |
AnnotationAttributes | Attributes to initialize this attributes instance to. May be null, in which case the new instance contains default attributes. |
- Source:
Members
backgroundColor :Color
Indicates the background color of the callout.
Type:
- Default Value:
- White
- Source:
cornerRadius :Number
Indicates the radius for the corners.
Type:
- Number
- Default Value:
- 0
- Source:
drawLeader :Boolean
Indicates whether to draw a leader pointing to the annotation's geographic position.
Type:
- Boolean
- Default Value:
- true
- Source:
height :Number
Indicates height of the callout.
Type:
- Number
- Default Value:
- 100
- Source:
insets :Insets
Indicates the insets instance of this object.
Insets adjusts top, bottom, left, right padding for the text.
Type:
- Default Value:
- 0, 0, 0, 0
- Source:
leaderGapHeight :Number
Indicates the gap height of the leader in pixels.
Type:
- Number
- Default Value:
- 30
- Source:
leaderGapWidth :Number
Indicates the gap width of the leader in pixels.
Type:
- Number
- Default Value:
- 40
- Source:
opacity :Number
Indicates the opacity of the annotation.
The value ranges from 0 to 1.
Opacity affects both callout and text.
Type:
- Number
- Default Value:
- 1
- Source:
scale :Number
Indicates the scale multiplier.
Type:
- Number
- Default Value:
- 1
- 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:
textAttributes :TextAttributes
Indicates the attributes to apply to the annotation's text.
Type:
- Default Value:
- The defaults of TextAttributes.
- Source:
width :Number
Indicates the width of the callout.
Type:
- Number
- Default Value:
- 200
- 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