new fengmap.FMTextMarker(param, model)
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
json |
|
||||||||||||||||||||||||||||||||||||
model |
Members
-
readonlyfillcolor
-
文字填充色
Properties:
Name Type Description fillcolorstring | number 文字填充色
-
readonlyfontsize
-
文字字号
Properties:
Name Type Description fontsizenumber 文字字号
-
groupID
-
楼层id
Properties:
Name Type Description groupIDnumber 楼层id
-
height
-
高度
Properties:
Name Type Description heightnumber 高度
-
readonlymapCoord
-
元素中心点坐标点
Properties:
Name Type Description mapCoordjson 地图坐标{x;,y:,z:}
-
name
-
文字内容
Properties:
Name Type Description namestring 文字内容
-
readonlynodeType
-
地图元素对象类型
Properties:
Name Type Description nodeTypefengmap.FMNodeType 地图元素对象类型
-
show
-
地图元素的显示/隐藏
Properties:
Name Type Description showbool 【true】: 显示,【false】: 隐藏
-
readonlystrokecolor
-
文字边线颜色
Properties:
Name Type Description strokecolorstring | number 文字边线色
Methods
-
inherited alwaysShow()
-
是否一直显示。
-
inherited avoid(value)
-
图层内或单个元素与同一图层内的其他元素在同一位置有相互遮盖时,是否自动避让。FMImageMarker FMTextMarker有效。
Name Type Description valuebool 【true】: 需避让,【false】: 不避让。注意:avoid方法与show属性不能同时使用,使用avoid方法会自动更新show属性的值。
-
getPosition(){json}
-
获取marker的地图坐标
Returns:
Type Description json {x:, y:, z:, groupID:} -
moveTo(params)
-
动画移动marker到指定位置
Name Type Description paramsjson Name Type Description xnumber 地图x坐标
ynumber 地图y坐标
timenumber 移动到指定位置所用的时间(秒)
callbackfunction 移动到指定位置后的回调函数
updatefunction 动画执行过程中位置更新时的回调函数,返回更新后的位置信息。
-
moveToGroup(groupID)
-
将marker移动到另一楼层
Name Type Description groupIDnumber 楼层id
-
setPosition(x, y, groupID, height)
-
设置marker位置
Name Type Description xnumber 地图x坐标
ynumber 地图y坐标
groupIDnumber 楼层id
heightnumber 偏移高度
-
stopMoveTo()
-
停止moveTo动画