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. 
 
var strKey = object.getId();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.
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 - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
var gridCellNum = colorGrid3D.SetGridPosition(new Module.JSVector2D(124.2, 39), new Module.JSVector2D(130.5, 39), new Module.JSVector2D(130.5, 34.5), new Module.JSVector2D(124.2, 34.5), 1000.0, 100, 100);SetGridCellDefaultColor(color) → boolean
Sets the default color value for the grid.
- Return - TRUE: Object option setting successful. 
- FALSE: Object option setting failed. 
 
- Sample - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetGridCellDefaultColor(new Module.JSColor(255, 255, 255, 0));SetGridCellColor(row, column, color) → boolean
Sets the color value for the cell at the specified horizontal and vertical index.
- 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 - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetGridCellColor(0, 0, new Module.JSColor(255, 255, 0, 0));SetGridLineColor(color) → boolean
Sets the border color of the 3D grid object.
- Return - true: Object option setting successful. 
- false: Object option setting failed. 
- Failure conditions. - If the 3D grid border is not created. 
 
 
- Sample - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetGridLineColor(new Module.JSColor(150, 255, 0, 0));SetGridCellLineColor(row, column, color) → boolean
Sets the border color value for the cell at the specified horizontal and vertical index.
- 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 - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetGridCellLineColor(0, 0, new Module.JSColor(150, 255, 0, 0));SetGridCellHeight(row, column, color) → boolean
Sets the height value for the cell at the specified horizontal and vertical index.
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 - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetGridCellHeight(0, 0, 30);SetDrawLine(type) → boolean
Sets the creation of the border for the 3D grid object.
The initial setting for border creation is false.
type
boolean
true for creating a border. false for not creating a border.
- Return - true: Object option setting successful. 
- false: Object option setting failed. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetDrawLine(true);SetNormal(type) → boolean
Sets the shading effect for the 3D grid object.
The initial setting for the shading effect is false.
type
boolean
true for setting shading effect. false for default visualization.
- Return - true: Object option setting successful. 
- false: Object option setting failed. 
 
- Sample - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.SetNormal(true);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 - Refer to function showGrid. 
 
var colorGrid3D = Module.createColorGrid3D("COLOR_GRID_3D");
colorGrid3D.Create();Getter / Setter
getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
- Return - string: Successful return of the object's description string. 
- null: If the object is null. 
 
var strDesc = object.getDescription();
// ... or ...
object.setDescription("First Object.");getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
- Return - string: Successful return of the object's name. 
- null: If the object is null. 
 
var objName = object.getName();
// ... or ...
object.setName("MyObject");getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
- Return - true: Object visible state. 
- false: Object hidden state. 
 
var objName = object.getName();
// ... or ...
object.setVisible(true);Last updated
