Class: GraphicText

GraphicText()

new GraphicText()

Source:

Methods

(async, static) createObj() → {Promise.<GraphicText>}

构造一个新的 GraphicText 对象。
Source:
Returns:
Type
Promise.<GraphicText>

(async, static) getAnchorPoint() → {Promise.<PointF>}

获取锚点
Source:
Returns:
文本锚点的位置:左下角为(0,0),右上角为(1,1)
Type
Promise.<PointF>

(async, static) getFontSize() → {Promise.<Number>}

获取字体大小
Source:
Returns:
Type
Promise.<Number>

(async, static) getPoint() → {Promise.<Dot>}

获取文本的位置
Source:
Returns:
Type
Promise.<Dot>

(async, static) getText() → {Promise.<String>}

获取文本
Source:
Returns:
Type
Promise.<String>

(async, static) getTextHeight() → {Promise.<Number>}

获取文本高度
Source:
Returns:
Type
Promise.<Number>

(async, static) getTextWidth() → {Promise.<Number>}

获取文本宽度
Source:
Returns:
Type
Promise.<Number>

(async, static) isSlope() → {Promise.<Boolean>}

获取是否随地图倾斜
Source:
Returns:
Type
Promise.<Boolean>

(async, static) setAnchorPointByPoint(anchorPoint) → {Promise.<void>}

设置锚点
Parameters:
Name Type Description
anchorPoint PointF 文本锚点的位置:左下角为(0,0),右上角为(1,1)
Source:
Returns:
Type
Promise.<void>

(async, static) setFontSize(fontSize) → {Promise.<void>}

设置字体大小
Parameters:
Name Type Description
fontSize Number 字体大小
Source:
Returns:
Type
Promise.<void>

(async, static) setPoint(point) → {Promise.<void>}

设置位置
Parameters:
Name Type Description
point Dot 定位点相对于文字的位置
Source:
Returns:
Type
Promise.<void>

(async, static) setReferenceInfo(referenceWidth, referenceHeight, referenceInterval, anchorPoint) → {Promise.<void>}

设置锚点
Parameters:
Name Type Description
referenceWidth Number 参考宽度
referenceHeight Number 参考高度
referenceInterval Number 参考间隔
anchorPoint PointF 文本锚点的位置:左下角为(0,0),右上角为(1,1)
Source:
Returns:
Type
Promise.<void>

(async, static) setSlope(isSlope) → {Promise.<void>}

设置是否随地图倾斜
Parameters:
Name Type Description
isSlope boolean
Source:
Returns:
Type
Promise.<void>

(async, static) setText(text) → {Promise.<void>}

设置文本
Parameters:
Name Type Description
text String
Source:
Returns:
Type
Promise.<void>