Methods
-
staticCesium.ColorTable.clone(colorTable, result) → ColorTable
-
Copy the color table object.
Name Type Description colorTableColorTable The color table object to be copied. resultColorTable optional The object used to store the result. If undefined, a new instance will be created. Returns:
The modified result parameter, or a new instance if not provided. If the color table is undefined, return undefined.Example:
var colorTable = new Cesium.ColorTable(); colorTable.insert(900, new Cesium.Color(1, 0, 0)); colorTable.insert(600, new Cesium.Color(0, 0, 1)); var cloneTable = Cesium.ColorTable.clone(colorTable); -
Remove the color table.
Example:
var colorTable = new Cesium.ColorTable(); colorTable.clear(); -
Get the number of color table objects.
Returns:
The number of color tables.Example:
var colorTable = new Cesium.ColorTable(); var count = colorTable.count(); -
Get the color table object of the specified index.
Name Type Description indexNumber The specified index value. Returns:
Object color table: Key is the elevation value, and Value is the object color.Example:
var colorTable = new Cesium.ColorTable(); var value = colorTable.getItem(1) -
The color table inserts a new item.
Name Type Description valueNumber The height value. colorColor optional Color information. Example:
var colorTable = new Cesium.ColorTable(); colorTable.insert(900, new Cesium.Color(1, 0, 0)); colorTable.insert(600, new Cesium.Color(0, 0, 1)); -
Color information.
Name Type Description valueNumber Specify the height value. Returns:
Return true if the removal is successful, otherwise false.Example:
var colorTable = new Cesium.ColorTable(); colorTable.remove(30);
