Namespace: GraphicObject

GraphicObject

点标号和线面标号几何对象基类。

Extends

Methods

addLatLng(latlng)

leaflet/layer/GraphicObject.js, line 170

增加标号的位置点。

Name Type Description
latlng L.LatLng

标号的位置点。

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

取消标号闪烁

canSetInnerText(){boolean}

leaflet/layer/GraphicObject.js, line 329

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

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

destroy()

leaflet/layer/GraphicObject.js, line 134

销毁对象。

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

leaflet/layer/GraphicObject.js, line 160

获取标号位置点。

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

getPolylineCellBufferGradientParameter(){Object}

leaflet/layer/GraphicObject.js, line 125

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

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

getScaleByMap(){boolean}

leaflet/layer/GraphicObject.js, line 192

获取点标号是否随图缩放。

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

getSurroundLineType(){number}

leaflet/layer/GraphicObject.js, line 201

获取标号的衬线类型。

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

isShowPolylineCellBufferGradient(){boolean}

leaflet/layer/GraphicObject.js, line 86

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

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

setLatLngs(latlngs)

leaflet/layer/GraphicObject.js, line 145

设置标号位置点。

Name Type Description
latlngs Array.<L.LatLng>

标号的位置点。

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

setScaleByMap(isScaleByMap)

leaflet/layer/GraphicObject.js, line 182

设置点标号是否随图缩放。

Name Type Description
isScaleByMap boolean

点标号是否随图缩放。

setShowPolylineBufferGradient(showPolylineCellBufferGradient)

leaflet/layer/GraphicObject.js, line 74

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

Name Type Description
showPolylineCellBufferGradient boolean

是否显示缓冲渐变。

setSurroundLineType(surroundLineType)

leaflet/layer/GraphicObject.js, line 211

设置标号的衬线类型。

Name Type Description
surroundLineType number

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