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);
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
textContent |
string |
文字内容。 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
textPosition |
AnnoPosition |
文字相对标号的位置。 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style |
FontStyle |
文字的样式(兼容旧版本标牌,如果options中传入signType枚举值,则这里的样式不可用,此时标牌的样式修改使用标号中的setSymbolTextStyle接口)。 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
对象标注参数。
|
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 设置对象标注数据。