Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
Object with the following properties:
|
Members
-
readonlydefinitionChanged : Event
-
Gets the event that is raised whenever a property or sub-property is changed or modified.
-
eyeOffset : Property
-
Gets or sets the
Cartesian3
Property specifying the label's offset in eye coordinates. Eye coordinates is a left-handed coordinate system, wherex
points towards the viewer's right,y
points up, andz
points into the screen.An eye offset is commonly used to arrange multiple labels or objects at the same position, e.g., to arrange a label above its corresponding 3D model.
Below, the label is positioned at the center of the Earth but an eye offset makes it always appear on top of the Earth regardless of the viewer's or Earth's orientation.l.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);
-
Default Value:
Cartesian3.ZERO
-
fillColor : Property
-
Gets or sets the Property specifying the fill
Color
. -
Gets or sets the string Property specifying the font in CSS syntax.
See:
-
horizontalOrigin : Property
-
Gets or sets the Property specifying the
HorizontalOrigin
. -
outlineColor : Property
-
Gets or sets the Property specifying the outline
Color
. -
outlineWidth : Property
-
Gets or sets the numeric Property specifying the outline width.
-
pixelOffset : Property
-
Gets or sets the
Cartesian2
Property specifying the label's pixel offset in screen space from the origin of this label. This is commonly used to align multiple labels and labels at the same position, e.g., an image and text. The screen space origin is the top, left corner of the canvas;x
increases from left to right, andy
increases from top to bottom.
The label's origin is indicated by the yellow point.default
l.pixeloffset = new Cartesian2(25, 75);
-
Default Value:
Cartesian2.ZERO
-
pixelOffsetScaleByDistance : Property
-
Gets or sets
NearFarScalar
Property specifying the pixel offset of the label based on the distance from the camera. A label's pixel offset will interpolate between theNearFarScalar#nearValue
andNearFarScalar#farValue
while the camera distance falls within the upper and lower bounds of the specifiedNearFarScalar#near
andNearFarScalar#far
. Outside of these ranges the label's pixel offset remains clamped to the nearest bound. -
Gets or sets the numeric Property specifying the uniform scale to apply to the image. A scale greater than
1.0
enlarges the label while a scale less than1.0
shrinks it.
From left to right in the above image, the scales are0.5
,1.0
, and2.0
.-
Default Value:
1.0
-
Gets or sets the boolean Property specifying the visibility of the label.
-
Gets or sets the Property specifying the
LabelStyle
. -
Gets or sets the string Property specifying the text of the label.
-
translucencyByDistance : Property
-
Gets or sets
NearFarScalar
Property specifying the translucency of the label based on the distance from the camera. A label's translucency will interpolate between theNearFarScalar#nearValue
andNearFarScalar#farValue
while the camera distance falls within the upper and lower bounds of the specifiedNearFarScalar#near
andNearFarScalar#far
. Outside of these ranges the label's translucency remains clamped to the nearest bound. -
verticalOrigin : Property
-
Gets or sets the Property specifying the
VerticalOrigin
.
Methods
-
clone(result) → LabelGraphics
-
Duplicates this instance.
Name Type Description result
LabelGraphics optional The object onto which to store the result. Returns:
The modified result parameter or a new instance if one was not provided. -
Assigns each unassigned property on this object to the value of the same property on the provided source object.
Name Type Description source
LabelGraphics The object to be merged into this object.