Label
Extends
CustomObject
class Label extends CustomObject
Static
create
static create(json = null): Label
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: Label
getName
static getName(): string
Returns:
Type: string
Constructor
constructor
constructor(json = null): Label
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
alignment
Type | Default | Description |
---|---|---|
enum(LABEL_ALIGNMENTS) | LABEL_ALIGNMENTS.CENTER |
background_color
Type | Default | Description |
---|---|---|
string | null | null |
font
Type | Default | Description |
---|---|---|
string | null | 'Arial' |
font_color
Type | Default | Description |
---|---|---|
string | '#000000' |
font_size
Type | Default | Description |
---|---|---|
number | 5 |
label
Type | Default | Description |
---|---|---|
string | null | null |
Overwritten Properties
type
Type | Default | Description |
---|---|---|
enum(CUSTOM_OBJECT_TYPES) | CUSTOM_OBJECT_TYPES.LABEL |
Read-Only
Inherited Properties
autoscale
Type | Default | Description |
---|---|---|
boolean | false |
id
Type | Default | Description |
---|---|---|
null | int | symbol | null | The entity identifier |
metadata
Type | Default | Description |
---|---|---|
Map | new Map() |
offset
Type | Default | Description |
---|---|---|
Vector | new Vector() |
orientation_mode
Type | Default | Description |
---|---|---|
enum(CUSTOM_OBJECT_ORIENTATION_MODES) | CUSTOM_OBJECT_ORIENTATION_MODES.BILLBOARD |
permanent_display
Type | Default | Description |
---|---|---|
boolean | true |
place
Type | Default | Description |
---|---|---|
Reference<Place> | new Reference('Place', null) |
poi
Type | Default | Description |
---|---|---|
Reference<Poi> | new Reference('Poi', null) |
priority
Type | Default | Description |
---|---|---|
int | 0 |
rotation
Type | Default | Description |
---|---|---|
number | 0 |
site
Type | Default | Description |
---|---|---|
Reference<Site> | new Reference('Site', null) |
Methods
toJSON
toJSON(): object
Returns:
Type: object (see properties bellow)
Name | Type | Description |
---|---|---|
autoscale | boolean | |
id | int | symbol | null | |
metadata | object | |
offset | {x: number, y: number, z: number} | See Vector |
orientation_mode | string | See CUSTOM_OBJECT_ORIENTATION_MODES |
permanent_display | boolean | |
place | int | symbol | null | |
poi | int | symbol | null | |
priority | int | |
rotation | number | |
site | int | symbol | null | |
type | string | null | |
alignment | string | See alignment property |
background_color | string | null | |
font | string | |
font_color | string | |
font_size | number | |
label | string | null |
fromJSON
fromJSON(json: object): Label
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | object | Yes | - | |
json.autoscale | boolean | No | false | |
json.id | int | symbol | null | No | null | |
json.metadata | object | No | {} | |
json.offset | {x: number, y: number, z: number} | No | {x: 0, y: 0, z: 0} | See Vector |
json.orientation_mode | string | No | 'BILLBOARD' | See CUSTOM_OBJECT_ORIENTATION_MODES |
json.permanent_display | boolean | No | true | |
json.place | int | symbol | null | No | null | |
json.poi | int | symbol | null | No | null | |
json.priority | int | No | 0 | |
json.rotation | number | No | 0 | |
json.site | int | symbol | null | No | null | |
json.type | string | null | No | 'label' | |
json.alignment | string | No | 'center' | See alignment property |
json.background_color | string | null | No | null | |
json.font | string | No | 'Arial' | |
json.font_color | string | No | '#000000' | |
json.font_size | number | No | 5 | |
json.label | string | null | No | null |
Returns:
Returns this
clone
clone(): Label
Returns:
A new deep copy
Type: Label