Class: ColorDictionary

ColorDictionary

颜色对照表类。颜色对照表中的键名为具体的高程值,键值表示该高程值要显示的颜色。
对于栅格图层中高程值小于颜色对照表中高程最小值的点,使用颜色对照表中高程最小值对应的颜色;
对于栅格图层中高程值大于颜色对照表中高程最大值的点,使用颜色对照表中高程最大值对应的颜色;
对于栅格图层中高程值在颜色对照表中没有对应颜色的点,则查找颜色对照表中与当前高程值相邻的两个高程对应的颜色。
通过渐变运算每个高程值要显示的颜色,如果设置了颜色对照表的话,则颜色表设置无效。

new ColorDictionary(options)

Usage
import { ColorDictionary } from '@supermapgis/iclient-ol';

new ColorDictionary(options);
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.ColorDictionary({paramsNames});
  // 弃用的写法
  new SuperMap.ColorDictionary(options);
</script>
common/iServer/ColorDictionary.js, line 7
Name Type Description
options Object

参数。

Name Type Description
elevation number

高程值。

color ServerColor

服务端颜色类。

Members

服务端颜色类。

elevationnumber

高程值。

Methods

destroy()

common/iServer/ColorDictionary.js, line 50

释放资源,将引用资源的属性置空。

toServerJSONObject(){Object}

common/iServer/ColorDictionary.js, line 58

转换成对应的 JSON 格式对象。

Returns:
Type Description
Object JSON 对象。