Class: ThemeUniqueItem

ThemeUniqueItem

单值专题图子项类。单值专题图是将专题值相同的要素归为一类,为每一类设定一种渲染风格,其中每一类就是一个专题图子项。比如,利用单值专题图制作行政区划图,Name 字段代表省/直辖市名,该字段用来做专题变量,如果该字段的字段值总共有 5 种不同值,则该行政区划图有 5 个专题图子项。

new ThemeUniqueItem(options)

Usage
import { ThemeUniqueItem } from '@supermapgis/iclient-leaflet';

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

参数。

Name Type Default Description
unique string

单值专题图子项的单值字段。

caption string 可选

单值专题图子项的标题。

style ServerStyle 可选

单值专题图子项的风格。

visible boolean true 可选

单值专题图子项是否可见。

API Relations

Returned by: ThemeUniqueItem.fromObj.

Members

captionstring

单值专题图子项的标题。

单值专题图子项的显示风格。

uniquestring

单值专题图子项的值,可以为数字、字符串等。

visibleboolean

单值专题图子项的可见性。

Default Value:
true

Methods

static fromObj(obj){ThemeUniqueItem}

common/iServer/ThemeUniqueItem.js, line 85

从传入对象获取单值专题图子项类。

Name Type Description
obj Object

传入对象。

Returns:
Type Description
ThemeUniqueItem ThemeUniqueItem 对象。

destroy()

common/iServer/ThemeUniqueItem.js, line 53

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

toServerJSONObject(){Object}

common/iServer/ThemeUniqueItem.js, line 69

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

Returns:
Type Description
Object 对应的 JSON 格式对象。