Class: Route

L.supermap.plotting.Route

航线对象。

L.supermap.plotting.Route()

leaflet/layer/Route.js, line 7

Extends

Members

codenumber

标号的code。

customobject

用来存储用户的自定义数据,只负责保存,不会对其做任何操作。

extendPropertyobject

标号的自定义属性。

libIDnumber

标号所属标号库的ID。

nextRouteNodeTypeSuperMap.Plot.RouteNodeType

下一个航线点类型。

notestring

标号的备注。

stylestyle

标号的显示风格。

symbolNamestring

标号的名称。

标号的几何类型,可以根据该参数判断标号的具体类型。

uuidstring

标号的唯一标识符。

Methods

inherited addAvoidRegion(region)

leaflet/layer/PlottingObject.js, line 510

设置标号的避让区域

Name Type Description
region L.supermap.plotting.avoidRegion

避让区域。

addRouteNode(routeNode, startNode, startText, startRel)

leaflet/layer/Route.js, line 377

添加航线节点。

Name Type Description
routeNode SuperMap.Plot.RouteNode

航线点。

startNode SuperMap.Plot.RouteNode

该节点的起始节点。

startText Array.<string>

该节点与上一节点间的文字。

startRel SuperMap.Plot.RelLineText

该节点与上一节点间文字与线的关系。

applyLineStyle(style)

leaflet/layer/Route.js, line 164

修改航线样式。

Name Type Description
style Object

航线样式。

Name Type Default Description
color string #ff0000 可选

线颜色,默认为"#ff0000"。

dashArray string 可选

线型,它是一个数列,数与数之间用逗号隔开,指定短划线和缺口的长度。

opacity number 1 可选

线透明度(0-1),默认为1。

weight number 可选

线宽度,单位:pixel。

applyNodeStyle(style)

leaflet/layer/Route.js, line 185

修改航线节点样式。

Name Type Description
style Object

航线节点样式。

Name Type Default Description
color string #ff0000 可选

线颜色,默认为"#ff0000"。

dashArray string 可选

线型,它是一个数列,数与数之间用逗号隔开,指定短划线和缺口的长度。

opacity number 1 可选

线透明度(0-1),默认为1。

weight number 可选

线宽度,单位:pixel。

applyTextStyle(style)

leaflet/layer/Route.js, line 141

修改航线线上文字或标牌文字的样式。

Name Type Description
style Object

文字的样式。

Name Type Default Description
fontColor string #000000 可选

字体颜色,默认为"#000000"。

fontFamily string 可选

字体类型。

fontOpacity number 可选

字体透明度 (0-1)。

fontSize number 可选

字体大小。

blinkRoute(startColorStyle, endColorStyle, blinkNums, intervalTime)

leaflet/layer/Route.js, line 89

航线闪烁,闪烁完成后显示航线本身的颜色。

Name Type Description
startColorStyle Object

闪烁的起始样式,默认是线色为红色。

endColorStyle Object

闪烁的结束样式,默认是线色为蓝色。

blinkNums Object

闪烁的次数,默认闪烁次数是2。

intervalTime Object

闪烁的时间间隔,默认闪烁间隔为300毫秒。

inherited clone()

leaflet/layer/PlottingObject.js, line 378

拷贝标号。

deleteRouteNode(routeNode)

leaflet/layer/Route.js, line 207

删除航线节点。

Name Type Description
routeNode SuperMap.Plot.RouteNode

航线点。

destroy()

leaflet/layer/Route.js, line 45

销毁几何图形。

inherited getBounds()

leaflet/layer/PlottingObject.js, line 364

获取标号包围盒。

inherited getExtendProperty(){SuperMap.Plot.ExtendProperty}

leaflet/layer/PlottingObject.js, line 501

获取自定义属性列表。

Returns:
Type Description
SuperMap.Plot.ExtendProperty 自定义属性列表。

inherited getLocked()

leaflet/layer/PlottingObject.js, line 431

获取标号是否锁定。

inherited getRotate()

leaflet/layer/PlottingObject.js, line 467

获取标号旋转角度。

inherited getSubSymbols(){Object}

leaflet/layer/PlottingObject.js, line 475

获取线面标号的子标号。

Returns:
Type Description
Object 线面标号的子标号。

inherited getTextContent(){string}

leaflet/layer/PlottingObject.js, line 492

获取标号的注记内容。

Returns:
Type Description
string 注记内容。

inherited getTextPosition()

leaflet/layer/PlottingObject.js, line 484

设置点标号注记位置。

highlight(highlightStyle)

leaflet/layer/Route.js, line 56

高亮航线。

Name Type Description
highlightStyle Object

高亮的样式。

insertRouteNode(routeNode, startNode, endNode, removeOldRel, startText, startRel, endText, endRel)

leaflet/layer/Route.js, line 301

插入航线节点。

Name Type Description
routeNode SuperMap.Plot.RouteNode

航线点。

startNode SuperMap.Plot.RouteNode

插入的起始航线点。

endNode SuperMap.Plot.RouteNode

插入的结束航线点。

removeOldRel boolean

是否移除原来的起始点与结束点间的连接关系。

startText Array.<string>

起始航线点与该航线点间文字。

startRel SuperMap.Plot.RelLineText

起始航线点与该航线点间文字与线的关系。

endText Array.<string>

结束航线点与该航线点间文字。

endRel SuperMap.Plot.RelLineText

结束航线点与该航线点间文字与线的关系。

inherited removeAvoidRegions(regions)

leaflet/layer/PlottingObject.js, line 524

移除标号的避让区域。

Name Type Description
regions Array.<L.supermap.plotting.avoidRegion>

避让区域。

inherited setLocked(locked)

leaflet/layer/PlottingObject.js, line 439

设置标号锁定。

Name Type Description
locked Boolean

标号锁定。

setNextRouteNodeType(routeNodeType)

leaflet/layer/Route.js, line 582

设置下一个航线节点类型。

Name Type Description
routeNodeType SuperMap.Plot.RouteNodeType

下一个航线点类型。

inherited setStyle(style)

leaflet/layer/PlottingObject.js, line 390

设置标号样式。

Name Type Description
style style

标号样式。

inherited setTextContent(content)

leaflet/layer/PlottingObject.js, line 417

设置注记内容。

Name Type Description
content string

注记内容。

inherited toGeoJsonStr(){string}

leaflet/layer/PlottingObject.js, line 1271

根据标绘对象返回 GeoJson 串。

Returns:
Type Description
string 需要转换 GeoJson 串的标绘对象

unhighlight()

leaflet/layer/Route.js, line 73

取消高亮航线。

updateRouteNode(routeNode)

leaflet/layer/Route.js, line 250

更新航线节点。

Name Type Description
routeNode SuperMap.Plot.RouteNode

航线点。