Class: SymbolAnnotation

SymbolAnnotation

标号注记。

new SymbolAnnotation(textContent, textPosition, style, options)

Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new SuperMap.Plot.SymbolAnnotation(textContent, textPosition, style, options);
  
  
</script>

// ES6 Import
import { SymbolAnnotation } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';

new SymbolAnnotation(textContent, textPosition, style, options);

common/plot/SymbolAnnotation.js, line 1
Name Type Description
textContent string

文字内容。

textPosition AnnoPosition

文字位置。

style TextStyle

文字的样式。

options Object

对象标注参数。

Name Type Description
pixelOffset L.point 可选

文字内容偏移量,单位像素

Members

pixelOffsetL.point

文字内容在XY方向的偏移量,单位是像素。

styleTextStyle

文字的样式。

textContentstring

文字内容。

textPositionAnnoPosition

文字相对标号的位置。

Methods

clone(){SymbolAnnotation}

common/plot/SymbolAnnotation.js, line 81

克隆对象标注对象。

Returns:
Type Description
SymbolAnnotation 克隆后的对象标注对象。

destroy()

common/plot/SymbolAnnotation.js, line 71

销毁图形对象数据。

getPixelOffset(){L.point}

common/plot/SymbolAnnotation.js, line 164

获取当前比例尺下注记的偏移量,单位像素,这个值会随比例尺的变化改变。

Returns:
Type Description
L.point 获取偏移点,单位像素

getStyle(){Object}

common/plot/SymbolAnnotation.js, line 139

获取注记样式

Returns:
Type Description
Object 注记样式

getSymbolData(){SymbolAnnotation}

common/plot/SymbolAnnotation.js, line 97

设置对象标注数据。

Returns:
Type Description
SymbolAnnotation 设置对象标注数据。

parseSymbolData(){SymbolAnnotation}

common/plot/SymbolAnnotation.js, line 111

解析对象标注数据。

Returns:
Type Description
SymbolAnnotation 解析对象标注数据。

setPixelOffset(plottingObject, x, y)

common/plot/SymbolAnnotation.js, line 148

用像素值设置注记偏移,最终会转为当前比例尺下的经纬度

Name Type Description
plottingObject plottingObject

所属标绘对象。

x number

x方向偏移值,单位是像素。

y number

y方向偏移值,单位是像素。

setStyle(style)

common/plot/SymbolAnnotation.js, line 129

设置注记样式。

Name Type Description
style Object

注记样式