JSColorGrid3D

API for creating and modifying 3D grid objects.

Create a API with Module.createColorGrid3D.

var colorGrid3D = Module.createColorGrid3D("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.

SetGridPosition(leftTop, rightTop, rightBottom, leftBottom, altitude, row, col) → number

Creates a 3D grid object based on four longitude and latitude coordinates, height, and the number of rows and columns.

Name
Type
Description

leftTop

Top left longitude and latitude coordinate.

rightTop

Top right longitude and latitude coordinate.

rightBottom

Bottom right longitude and latitude coordinate.

leftBottom

Bottom left longitude and latitude coordinate.

altitude

number

Object height.

row

number

Number of rows in the grid.

col

number

Number of columns in the grid.

  • Return

    • Total number of grid cells.

  • Sample

SetGridCellDefaultColor(color) → boolean

Sets the default color value for the grid.

Name
Type
Description

color

Grid color value.

  • Return

    • TRUE: Object option setting successful.

    • FALSE: Object option setting failed.

  • Sample

SetGridCellColor(row, column, color) → boolean

Sets the color value for the cell at the specified horizontal and vertical index.

Name
Type
Description

row

number

Cell horizontal index.

column

number

Cell vertical index.

color

Cell color value.

  • Return

    • true: Object option setting successful.

    • false: Object option setting failed.

    • Failure conditions.

      • If the specified horizontal or vertical index exceeds the set range.

  • Sample

SetGridLineColor(color) → boolean

Sets the border color of the 3D grid object.

Name
Type
Description

color

Border color value.

  • Return

    • true: Object option setting successful.

    • false: Object option setting failed.

    • Failure conditions.

      • If the 3D grid border is not created.

  • Sample

SetGridCellLineColor(row, column, color) → boolean

Sets the border color value for the cell at the specified horizontal and vertical index.

Name
Type
Description

row

number

Cell horizontal index.

column

number

Cell vertical index.

color

Border color value.

  • Return

    • true: Object option setting successful.

    • false: Object option setting failed.

    • Failure conditions.

      • If the specified horizontal or vertical index exceeds the set range.

  • Sample

SetGridCellHeight(row, column, color) → boolean

Sets the height value for the cell at the specified horizontal and vertical index.

Name
Type
Description

row

number

Cell horizontal index.

column

number

Cell vertical index.

height

number

Cell height value.

  • Return

    • true: Object option setting successful.

    • false: Object option setting failed.

    • Failure conditions.

      • If the specified horizontal or vertical index exceeds the set range.

  • Sample

SetDrawLine(type) → boolean

Sets the creation of the border for the 3D grid object.

The initial setting for border creation is false.

Name
Type
Description

type

boolean

true for creating a border. false for not creating a border.

  • Return

    • true: Object option setting successful.

    • false: Object option setting failed.

SetNormal(type) → boolean

Sets the shading effect for the 3D grid object.

The initial setting for the shading effect is false.

Name
Type
Description

type

boolean

true for setting shading effect. false for default visualization.

  • Return

    • true: Object option setting successful.

    • false: Object option setting failed.

  • Sample

Create() → boolean

Creates the 3D grid object based on the set options.

  • Return

    • true: Object creation successful.

    • false: Object creation failed.

    • Failure conditions.

      • If no coordinates are entered.

      • If the specified horizontal or vertical index exceeds the set range.

  • 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