JSBillboard

API for setting up and modifying billboard objects made of planes.

Create a API with Module.createBillboard.

var object = Module.createBillboard("ID");

Function

getId() → string

Returns the Key of the object.

  • Return

    • string: Successful return of the object's Key string.

    • null: If the object is null.

set(position, icon, width, height) → boolean

Set options for creating a billboard object.

Name
Type
Description

position

Billboard location (based on the bottom center point) coordinates (longitude, latitude, altitude).

icon

Image icon of the object.

width

number

Width of the object (in meters).

height

number

Height of the object (in meters).

  • Return

    • true: Billboard option setting successful.

    • false: Billboard option setting failed.

  • Sample

setImage(position, data, width, height) → boolean

Set options for creating a billboard object.

The data variable is based on a binary array data of Uint8Array.

Name
Type
Description

position

Billboard location (based on the bottom center point) coordinates (longitude, latitude, altitude).

data

array

Image binary data.

width

number

Width of the image.

height

number

Height of the image.

  • Return

    • true: Billboard option setting successful.

    • false: Billboard option setting failed.

  • Sample

setSizeScale(x, y, z) → boolean

Set the scale of the object's representation.

Each value must be set to a number greater than 0.

Name
Type
Description

x

number

Scale along the x-axis.

y

number

Scale along the y-axis.

z

number

Scale along the z-axis.

  • Return

    • true: Billboard option setting successful.

    • false: Billboard option setting failed.

setSizeFix(type) → boolean

Set the object's size to be fixed or variable.

Name
Type
Description

type

boolean

true for fixed size mode, false for variable size mode.

  • Return

    • true: Billboard size option setting successful.

    • false: Billboard size option setting failed.

  • Sample

setRotationMode(type) → boolean

Set the directional representation of the billboard object.

Name
Type
Description

type

boolean

true for screen-facing fixed mode. false for fixed horizontal and variable vertical rotation mode.

  • Return

    • true: Billboard rotation option setting successful.

    • false: Billboard rotation option setting failed.

  • Sample

Getter / Setter

getDescription(), setDescription(desc) → string

Set a description for the object.

Name
Type
Description

desc

string

Object description string.

  • Return

    • string: Successful return of the object's description string.

    • null: If the object is null.

getName(), setName(name) → string

Sets the name of the object.

Name
Type
Description

name

string

The name to set for the object.

  • Return

    • string: Successful return of the object's name.

    • null: If the object is null.

getVisible(), setVisible(visible) → boolean

Sets the visibility state of an object.

Name
Type
Description

visible

boolean

true: Make the object visible. false: Hide the object.

  • Return

    • true: Object visible state.

    • false: Object hidden state.

Last updated