Class: LineRelation

LineRelation

对象间连接线, 通过PlottingLayer#createLineRelation接口进行创建。

new LineRelation(libID, code, latlngs, options)

leaflet/layer/LineRelation.js, line 5
Name Type Description
libID number

标号的ID。

code number

标号的code。

latlngs Array.<L.LatLng>

标号位置点。保留参数

options Object

标号参数。

Name Type Default Description
uuid string 可选

标号的唯一标识符。

startAssociatedUuid string 可选

连接线的开始对象的唯一ID。

endAssociatedUuid string 可选

连接线的结束对象的唯一ID。

lineRelationType LineRelationType LineRelationType.ARROW 可选

对象间连接线类型。

style style 可选

标号的显示风格。

Extends

Members

endAssociatedUuidstring

连接线的结束对象的唯一ID。

islocationCircleboolean

线性标注是否显示定位圆。

lineRelationTypeLineRelationType

对象间连接线类型。

roundBoxboolean

标注框显示圆角边框。

startAssociatedUuidstring

连接线的开始对象的唯一ID。

textBoxTypeTextBoxType

标注框边框类型。

textMaxScalenumber

文字随图后,控制文字的最大缩放比例

textMinScalenumber

文字随图后,控制文字的最小缩放比例

Methods

inherited addLatLng(latlng)

leaflet/layer/GraphicObject.js, line 170

增加标号的位置点。

Name Type Description
latlng L.LatLng

标号的位置点。

inherited bilnk(options)

leaflet/layer/GraphicObject.js, line 241

标号闪烁,默认闪烁5次,闪烁5秒。

Name Type Description
options object

可以不传。

Name Type Description
blinkNumber number

闪烁次数

duration number

闪烁时长

leaflet/layer/GraphicObject.js, line 280

取消标号闪烁

inherited canPolylineConnectLocationPoint(){boolean}

leaflet/layer/AlgoSymbol.js, line 1431

获取控制点个数大于3时,控制点间曲线是否可以设置折线连接。

Returns:
Type Description
boolean 返回是否可以设置折线连接。

inherited canSetInnerText(){boolean}

leaflet/layer/GraphicObject.js, line 329

线面标号是否可以设置中间横线注记。

Returns:
Type Description
boolean 返回是否可以设置中间横线注记。

inherited convertGraphicObjects(){PlottingObject}

leaflet/layer/AlgoSymbol.js, line 1287

标号转换接口,将自由线,对象连接线,多边形区域,扇形区域,沿线注记等转换为折线多边形文字等。

Returns:
Type Description
PlottingObject 返回转换后的线面标号。

destroy()

leaflet/layer/LineRelation.js, line 172

销毁几何图形。

inherited getArrowBodyType(){ArrowBodyType}

leaflet/layer/AlgoSymbol.js, line 354

获取箭身类型。

Returns:
Type Description
ArrowBodyType 返回箭身类型。

inherited getArrowHeadType(){ArrowHeadType}

leaflet/layer/AlgoSymbol.js, line 258

获取箭头类型。

Returns:
Type Description
ArrowHeadType 返回箭头类型。

inherited getArrowLineIsCurve(){boolean}

leaflet/layer/AlgoSymbol.js, line 293

获取箭头线线是否是曲线。

Returns:
Type Description
boolean 返回箭头线是否是曲线。

inherited getArrowTailType(){ArrowTailType}

leaflet/layer/AlgoSymbol.js, line 332

获取箭尾类型。

Returns:
Type Description
ArrowTailType 返回箭尾类型。

inherited getEndArrowType(){ArrowLineType}

leaflet/layer/AlgoSymbol.js, line 1483

获取基本标号箭头线结束箭头类型。

Returns:
Type Description
ArrowLineType 返回结束箭头类型。

inherited getIsCurveLine(){boolean}

leaflet/layer/AlgoSymbol.js, line 267

获取路径线是否是曲线。

Returns:
Type Description
boolean 返回路径线是否是曲线。

inherited getLatLngs(){Array.<L.LatLng>}

leaflet/layer/GraphicObject.js, line 160

获取标号位置点。

Returns:
Type Description
Array.<L.LatLng> 标号的位置点。

getLineRelationType(){LineRelationType}

leaflet/layer/LineRelation.js, line 53

获取连接线类型。

Returns:
Type Description
LineRelationType 返回连接线类型。

inherited getLocationCircle(){boolean}

leaflet/layer/AlgoSymbol.js, line 1422

获取是否显示定位圆。

Returns:
Type Description
boolean 返回是否显示定位圆。

inherited getPolylineCellBufferGradientParameter(){Object}

leaflet/layer/GraphicObject.js, line 125

获取折线图元缓冲渐变参数,详细参数见:setPolylineCellBufferGradientParameter。

Returns:
Type Description
Object 缓冲渐变参数。

inherited getPolylineConnectLocationPoint(){boolean}

leaflet/layer/AlgoSymbol.js, line 1439

获取控制点个数大于3时,控制点间曲线线是否是折线连接。

Returns:
Type Description
boolean 返回是否是折线连接。

inherited getRoundBox(){boolean}

leaflet/layer/AlgoSymbol.js, line 1398

获取是否显示标注框圆角边框。

Returns:
Type Description
boolean 返回是否显示标注圆角边框。

inherited getScaleByMap(){boolean}

leaflet/layer/AlgoSymbol.js, line 404

获取线面标号是否随图缩放。

Returns:
Type Description
boolean 返回线面标号是否随图缩放。

inherited getStartArrowType(){ArrowLineType}

leaflet/layer/AlgoSymbol.js, line 1461

获取基本标号箭头线起始箭头类型。

Returns:
Type Description
ArrowLineType 返回起始箭头类型。

inherited getSurroundLineType(){number}

leaflet/layer/GraphicObject.js, line 201

获取标号的衬线类型。

Returns:
Type Description
number 标号的衬线类型。

inherited getTextBoxType()

leaflet/layer/AlgoSymbol.js, line 1375

获取标注边框类型,支持带角矩形边框和线型底边两种类型。

inherited getTextContent(){String}

leaflet/layer/AlgoSymbol.js, line 249

获取注记内容。

Returns:
Type Description
String 返回注记内容。

inherited getTextPosition(){Object}

leaflet/layer/AlgoSymbol.js, line 1519

获取多边形区域文字位置。

Returns:
Type Description
Object 返回多边形区域文字位置。

inherited getTextSizeFixed(){boolean}

leaflet/layer/AlgoSymbol.js, line 1545

获取文字是否固定大小。

Returns:
Type Description
boolean 返回文字是否固定大小。

inherited isShowPolylineCellBufferGradient(){boolean}

leaflet/layer/GraphicObject.js, line 86

获取折线图元是否显示缓冲渐变。

Returns:
Type Description
boolean 否显示缓冲渐变。

inherited setArrowBodyType(arrowBodyType)

leaflet/layer/AlgoSymbol.js, line 363

设置箭身类型。

Name Type Description
arrowBodyType ArrowBodyType

箭身类型。

inherited setArrowHeadType(arrowHeadType)

leaflet/layer/AlgoSymbol.js, line 319

设置箭头类型。

Name Type Description
arrowHeadType ArrowHeadType

箭头类型。

inherited setArrowLineIsCurve(curveLine)

leaflet/layer/AlgoSymbol.js, line 304

设置箭头线是否为曲线。

Name Type Description
curveLine boolean

箭头线是否为曲线。

inherited setArrowTailType(arrowTailType)

leaflet/layer/AlgoSymbol.js, line 341

设置箭尾类型。

Name Type Description
arrowTailType ArrowTailType

箭尾类型。

inherited setCurveLine(curveLine)

leaflet/layer/AlgoSymbol.js, line 278

设置路径线是否为曲线路径。

Name Type Description
curveLine boolean

路径线是否为曲线路径。

inherited setEndArrowType(arrowTypeEnd)

leaflet/layer/AlgoSymbol.js, line 1492

设置基本标号箭头线结束箭头类型。

Name Type Description
arrowTypeEnd ArrowLineType

基本标号箭头线结束箭头类型。

setEndFeature(endAssociatedUuid)

leaflet/layer/LineRelation.js, line 112

设置结束位置对象,如果传入对象为空,则将对应标号也设置为空。

Name Type Description
endAssociatedUuid string

尾点标号的uuid。

setFeatures(startAssociatedUuid, endAssociatedUuid)

leaflet/layer/LineRelation.js, line 145

设置起始对象,传入标号不能为空。

Name Type Description
startAssociatedUuid string

起点标号的uuid。

endAssociatedUuid string

尾点标号的uuid。

inherited setLatLngs(latlngs)

leaflet/layer/GraphicObject.js, line 145

设置标号位置点。

Name Type Description
latlngs Array.<L.LatLng>

标号的位置点。

setLineRelationType(lineRelationType)

leaflet/layer/LineRelation.js, line 39

设置连接线类型。

Name Type Description
lineRelationType LineRelationType

连接线类型。

inherited setLocationCircle(locationCircle)

leaflet/layer/AlgoSymbol.js, line 1407

设置是否显示注记指示框定位圆。

Name Type Description
locationCircle boolean

是否显示定位圆。

inherited setPolylineCellBufferGradientParameter(parameter)

leaflet/layer/GraphicObject.js, line 95

设置折线图元缓冲渐变参数。

Name Type Description
parameter Object

折线图元缓冲渐变参数。

Name Type Description
startColor String

渐变开始颜色,默认值为:"rgba(255, 0, 0, 1)"

endColor String

渐变结束颜色,默认值为:"rgba(255, 0, 0, 0)"

bufferWidth Number

渐变宽度,默认值为:10,单位:毫米,最大生效值:30

isBufferLeft boolean

是否为左侧渐变,默认值为true

inherited setPolylineConnectLocationPoint(polylineConnectLocationPoint)

leaflet/layer/AlgoSymbol.js, line 1448

获取控制点个数大于3时,设置控制点间是折线或曲线。

Name Type Description
polylineConnectLocationPoint boolean

设置控制点间是折线或曲线。

inherited setRotate(rotateValue)

leaflet/layer/AlgoSymbol.js, line 376

设置线面标号的旋转角度。

Name Type Description
rotateValue number

线面标号的旋转角度。

inherited setRoundBox(roundBox)

leaflet/layer/AlgoSymbol.js, line 1383

设置是否显示标注框圆角边框。

Name Type Description
roundBox boolean

是否显示圆角边框。

inherited setScaleByMap(isScaleByMap)

leaflet/layer/AlgoSymbol.js, line 413

设置线面标号是否随图缩放。

Name Type Description
isScaleByMap boolean

线面标号是否随图缩放。

inherited setShowPolylineBufferGradient(showPolylineCellBufferGradient)

leaflet/layer/GraphicObject.js, line 74

设置折线图元是否显示缓冲渐变。

Name Type Description
showPolylineCellBufferGradient boolean

是否显示缓冲渐变。

inherited setStartArrowType(arrowTypeStart)

leaflet/layer/AlgoSymbol.js, line 1470

设置基本标号箭头线起始箭头类型。

Name Type Description
arrowTypeStart ArrowLineType

基本标号箭头线起始箭头类型。

setStartFeature(startAssociatedUuid)

leaflet/layer/LineRelation.js, line 79

设置起始位置对象,如果传入对象为空,则将对应标号也设置为空。

Name Type Description
startAssociatedUuid string

起点标号的uuid。

inherited setSubSymbol(code, npos, libID)

leaflet/layer/AlgoSymbol.js, line 444

设置线面标号的子标号。

Name Type Description
code number

子标号code。

npos number

子标号在线面标号所处的索引位置。

libID number

子标号的库ID。

inherited setSurroundLineType(surroundLineType)

leaflet/layer/AlgoSymbol.js, line 429

设置标号的衬线类型。

Name Type Description
surroundLineType number

标号的衬线类型,线面标号有四种类型:0无衬线,1内侧衬线,2外侧衬线,3双侧衬线。

inherited setTextBoxType(textBoxType)

leaflet/layer/AlgoSymbol.js, line 1362

设置标注边框类型,支持带角矩形边框和线型底边两种类型。

Name Type Description
textBoxType TextBoxType

标注框边框类型。

inherited setTextPosition(position)

leaflet/layer/AlgoSymbol.js, line 1530

设置多边形区域文字位置。

Name Type Description
position Object

多边形区域文字位置。

inherited setTextSizeFixed(value)

leaflet/layer/AlgoSymbol.js, line 1553

设置文字是否固定大小。(为false时 文字随图,为true 时文字固定大小)

Name Type Description
value boolean

文字是否固定大小。