Class: ThemeOffset

ThemeOffset

专题图中文本或符号相对于要素内点的偏移量设置类。 通过该类可以设置专题图中标记文本或符号的偏移量以及偏移量是否随地图缩放而改变。

new ThemeOffset(options)

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

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

可选参数。

Name Type Default Description
offsetFixed boolean false 可选

当前专题图是否固定标记文本或符号的偏移量。

offsetX string '0.0' 可选

专题图中文本或符号相对于要素内点的水平偏移量。

offsetY string '0.0' 可选

专题图中文本或符号相对于要素内点的垂直偏移量。

API Relations

Returned by: ThemeOffset.fromObj.

Members

offsetFixedboolean

当前专题图是否固定标记文本或符号的偏移量。所谓固定偏移量,指文本或符号的偏移量不随地图的缩放而变化。

offsetXstring

专题图中文本或符号相对于要素内点的水平偏移量。偏移量的单位为地图单位。 该偏移量的值为一个常量值或者字段表达式所表示的值,即如果字段表达式为 SmID,其中 SmID = 2,那么水平偏移量为 2。

Default Value:
0.0

offsetYstring

专题图中文本或符号相对于要素内点的垂直偏移量。偏移量的单位为地图单位。 该偏移量的值为一个常量值或者字段表达式所表示的值,即如果字段表达式为 SmID,其中 SmID = 2,那么垂直偏移量为 2。

Default Value:
0.0

Methods

static fromObj(obj){ThemeOffset}

common/iServer/ThemeOffset.js, line 58

从传入对象获取专题图中文本或符号相对于要素内点的偏移量设置类。

Name Type Description
obj Object

传入对象。

Returns:
Type Description
ThemeOffset ThemeOffset 对象。

destroy()

common/iServer/ThemeOffset.js, line 47

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