JSColorPolygon

API for creating and modifying gradient polygon objects.

Create a API with Module.createColorPolygon.

var colorPolygon = Module.createColorPolygon("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.

SetVerticalPlane(coordinates, parts, height, startColor, endColor) → boolean

Creates a vertical wall polygon object.

Object is configured with parameter.

Name
Type
Description

coordinates

List of longitude, latitude, altitude coordinates.

parts

List of the number of points composing the polygon.

height

number

Height of the polygon.

startColor

Gradient start color.

endColor

Gradient end color.

  • Return

    • true : Object creation successful.

    • false : Object creation failed.

    • failure condition.

      • No components in the entered coordinates or the number of vertices is less than 2.

      • No components in the entered parts or less than 1 part.

  • Sample

SetCullMode(type) → boolean

Sets the culling option for the vertical wall polygon.

The culling option based on the input value of type is 0(both sides), 1(both sides), 2(CW), 3(CCW).

The initial culling option setting is 3.

Name
Type
Description

type

number

Polygon culling mode

  • Return

    • true : Option setting successful.

    • false : 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