Class: SymbolText

SymbolText

标号注记。

new SymbolText(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.SymbolText(textContent, textPosition, style, options);
  
  
</script>

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

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

common/plot/SymbolText.js, line 3
Name Type Description
textContent string

文字内容。

textPosition AnnoPosition

文字相对标号的位置。

style FontStyle

文字的样式(兼容旧版本标牌,如果options中传入signType枚举值,则这里的样式不可用,此时标牌的样式修改使用标号中的setSymbolTextStyle接口)。

options Object

对象标注参数。

Name Type Description
offsetX number 可选

文字内容在X方向的偏移量。

offsetY number 可选

文字内容在Y方向的偏移量。

title string

标题。

signMode SignMode

标牌参数模式

signType SignType

标牌参数类型(signMode == 0或者1时生效)

templateUrl string

标牌模板路径(signMode == 2时生效)

signImage string

标牌图片路径路径(signMode == 3时生效)

domStr string

标牌div字符串(signMode == 2时生效)

scale string

标牌缩放比例

minVisibleLevel string

标牌最小可见比例尺

maxVisibleLevel string

标牌最大可见比例尺

showRelationLine boolean

是否显示标牌连接线

visible boolean

标牌可见性

linestyle Object

标牌连接线样式

Name Type Description
color string

标牌连接线样色

lineSymbolID string

标牌连接线类型

dashArray Array

标牌连接线虚线数组

opacity number

标牌连接线透明度

weight number

标牌连接线宽度

border boolean

是否显示标牌边框(兼容旧标牌,signType==null时候可用)

imgpath Object

标牌右上角图标(兼容旧标牌,signType==null时候可用)

paddingX number

是否边框和文字的横向距离, 单位是像素(兼容旧标牌,signType==null时候可用)

paddingY number

标牌边框和文字的纵向距离, 单位是像素(兼容旧标牌,signType==null时候可用)

Members

borderboolean

文字内容带边框显示。显示边框且有位置偏移,则标牌和标号间用直线连接。(兼容signType==null标牌)

domStrString

自定义标牌div

imgPathString

图片链接(兼容signType==null标牌)。

lineStyleLineStyle

牵引线样式。

offsetXnumber

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

offsetYnumber

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

paddingXnumber

边框和文字的横向距离, 单位是像素。(兼容signType==null标牌)

paddingYnumber

边框和文字的纵向距离, 单位是像素。(兼容signType==null标牌)

scaleBoolean

标牌的缩放比例

showRelationLineboolean

标牌与标号之间的连接线

signImageString

标牌图片资源或路径。

signModeSignMode

标牌参数模式。

signRenderModesignRenderMode

标牌渲染模式。

signTypeSignType

标牌类型。

styleFontStyle

边框和文字的样式。

templateUrlString

标牌模板路径。

textContentstring

文字内容。

textPositionAnnoPosition

文字相对标号的位置。

titleString

标题内容

visibleBoolean

标牌的可见性

Methods

clone(){SymbolText}

common/plot/SymbolText.js, line 268

克隆对象标注对象。

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

destroy()

common/plot/SymbolText.js, line 236

销毁图形对象数据。

parseSymbolData(){SymbolText}

common/plot/SymbolText.js, line 373

解析对象标注数据。

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

setSymbolData(){SymbolText}

common/plot/SymbolText.js, line 307

设置对象标注数据。

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