Class: AlgoSymbol

olplotting~ AlgoSymbol


new AlgoSymbol(options)

构造线面标绘符号
Parameters:
Name Type Description
options Object
Properties
Name Type Argument Description
libID Number 线面标绘符号的库号
code Number 线面标绘符号的代号
controlPoints Array 线面标绘符号的控制点
viewProjection string <optional>
标绘符号的视图投影
pickId * <optional>
鼠标选中当前标绘符号时返回的对象

Extends

Methods


getControlPoints()

获取线面标绘符号的控制点

setControlPoints(controlPoints)

设置线面标绘符号的控制点
Parameters:
Name Type Description
controlPoints Array 控制点

setSubSymbol(code [, rotation] [, flipX] [, index])

设置子态势符号的code值,旋转角度,是否X轴翻转等参数
Parameters:
Name Type Argument Default Description
code number 子态势符号的code值
rotation number <optional>
-90 子态势符号的旋转角度,逆时针旋转,默认是-90度
flipX boolean <optional>
是否X轴翻转子态势符号
index number <optional>
子态势符号的索引

setScaleValues(code)

设置态势符号的scaleValues,调整相关符号的大小比例
Parameters:
Name Type Description
code Array.<number> 态势符号的scaleValues

setArrow(scaleValue, angle, isLine)

设置箭头的样式,如果当前线面符号有箭头的情况
Parameters:
Name Type Description
scaleValue number 箭头大小占线面符号长度的比例
angle number 箭头张开的角度
isLine boolean 箭头样式是否是线,否则是面

getStroke()

获取线面标绘符号是否有边线

setStroke(value)

设置线面标绘符号边线
Parameters:
Name Type Description
value Boolean 是否给线面标绘符号绘制边线

getStrokeColor()

获取标绘符号的边线颜色

setStrokeColor(strokeColor)

设置标绘符号的边线颜色
Parameters:
Name Type Description
strokeColor string 边线颜色

getStrokeOpacity()

获取线面标绘符号的边线透明度

setStrokeOpacity(strokeOpacity)

设置线面标绘符号的边线透明度
Parameters:
Name Type Description
strokeOpacity Number 边线透明度

getStrokeWidth()

获取线面标绘符号的边线宽度

setStrokeWidth(strokeWidth)

设置线面标绘符号的边线宽度
Parameters:
Name Type Description
strokeWidth Number 边线宽度

getStrokeLineDash()

获取线面标绘符号的虚线模式

setStrokeLineDash(value)

设置线面标绘符号的虚线模式
Parameters:
Name Type Description
value Array.<Number> 虚线模式

getStrokeLineDashOffset()

获取线面标绘符号的虚线偏移量

setStrokeLineDashOffset(value)

设置线面标绘符号的虚线偏移量
Parameters:
Name Type Description
value Number 虚线偏移量

getFill()

获取线面标绘符号是否填充

setFill(value)

设置线面标绘符号是否填充
Parameters:
Name Type Description
value Boolean 是否填充

getFillColor()

获取线面标绘符号的填充颜色

setFillColor(fillColor)

设置线面标绘符号的填充颜色
Parameters:
Name Type Description
fillColor string 填充颜色

getFillOpacity()

获取线面标绘符号的填充透明度

setFillOpacity(fillOpacity)

设置线面标绘符号的填充透明度
Parameters:
Name Type Description
fillOpacity Number 填充透明度

getNotePosition()

获取线面标绘注记的位置信息

setNotePosition(lonlat)

设置线面标绘注记的位置信息
Parameters:
Name Type Description
lonlat Array.<Number> 注记的位置信息

getNoteText()

获取线面标绘注记的文本

setNoteText(noteText)

设置线面标绘注记的文本
Parameters:
Name Type Description
noteText string 注记文本

getNoteFont()

获取线面标绘注记的文本字体

setNoteFont(noteFont)

设置线面标绘注记的文本字体
Parameters:
Name Type Description
noteFont string 注记文本字体

getNoteFillColor()

获取线面标绘注记的填充颜色

setNoteFillColor(fillColor)

设置线面标绘注记的填充颜色
Parameters:
Name Type Description
fillColor string 注记填充颜色

getNoteOutlineColor()

获取线面标绘注记的线颜色

setNoteOutlineColor(outlineColor)

设置线面标绘注记的线颜色
Parameters:
Name Type Description
outlineColor string 注记的线颜色

getNoteOutlineWidth()

获取线面标绘注记的线宽

setNoteOutlineWidth(outlineWidth)

设置线面标绘注记的线宽
Parameters:
Name Type Description
outlineWidth Number 注记的线宽

getNoteOffset()

获取线面标绘注记的偏移信息

setNoteOffset(offset)

设置线面标绘注记的偏移信息
Parameters:
Name Type Description
offset Array.<Number> 偏移信息

getNoteTextAlign()

获取线面标绘注记的文本对齐方式

setNoteTextAlign(textAlign)

设置线面标绘注记的文本对齐方式
Parameters:
Name Type Description
textAlign string 文本对齐方式

getNoteScale()

获取线面标绘注记的缩放比例

setNoteScale(scale)

设置线面标绘注记的缩放比例
Parameters:
Name Type Description
scale Number 缩放比例

toJson()

导出为json字符串
Overrides:

<static> fromJson(jsonObject, options)

从json对象中构造线面标绘符号
Parameters:
Name Type Description
jsonObject Object json对象,保存的是线面标绘对象
options Object
Properties
Name Type Argument Description
parentLayer HTMLElement | string <optional>
新线面标绘对象所在的父图层组,如果存在,则自动将新线面标绘对象添加到父图层组中
pickId * <optional>
鼠标选取到新线面标绘时返回的对象
Returns:
Type
module:olplotting.AlgoSymbol

<static> copy(object, newOptions)

拷贝线面标绘符号对象,构造新的线面标绘符号
Parameters:
Name Type Description
object Object 线面标绘对象
newOptions Object
Properties
Name Type Argument Description
parentLayer HTMLElement | string <optional>
新线面标绘对象所在的父图层组,如果存在,则自动将新线面标绘对象添加到父图层组中
pickId * <optional>
鼠标选取到新线面标绘时返回的对象
Returns:
Type
module:olplotting.AlgoSymbol

destroy()

销毁线面标绘
Overrides:

getViewProjection()

获取标绘符号的视图投影
Inherited From:
Overrides:

setViewProjection(proj)

设置标绘符号的视图投影
Parameters:
Name Type Description
proj string 投影
Inherited From:
Overrides:

getPlottingLayer()

获取标绘图层
Inherited From:
Overrides:

setPlottingLayer(plottingLayer)

设置标绘图层
Parameters:
Name Type Description
plottingLayer * 标绘图层
Inherited From:
Overrides:

getLibID()

获取标绘符号的库号
Inherited From:
Overrides:

getCode()

获取标绘符号的代号
Inherited From:
Overrides:

bind(symbol)

绑定三维标绘,一旦绑定之后,调用二维标绘的相关接口时,三维标绘会同步改变
Parameters:
Name Type Description
symbol * 标绘符号
Inherited From:
Overrides:
See:

unbind()

解除绑定三维标绘
Inherited From:
Overrides:
See:

getUuid()

获取标绘符号的唯一标识(UUID)
Inherited From:
Overrides:

getPickId()

鼠标选取到当前标绘符号时返回的对象
Inherited From:
Overrides:

getVisible()

获取标绘符号的显示隐藏状态
Inherited From:
Overrides:

setVisible(value)

设置标绘符号的显示隐藏状态
Parameters:
Name Type Description
value Boolean 标绘符号的显隐状态
Inherited From:
Overrides:

获取标绘符号闪烁的状态
Inherited From:
Overrides:

设置标绘符号是否闪烁
Parameters:
Name Type Description
value Boolean 标绘符号闪烁状态
Inherited From:
Overrides:

getPickable()

获取标绘符号是否可以被选中
Inherited From:
Overrides:

setPickable(canPick)

设置标绘符号是否可以被选中
Parameters:
Name Type Description
canPick Boolean 是否可以被选中
Inherited From:
Overrides:

getCustom()

获取用户自定义对象
Inherited From:
Overrides:

setCustom(customObj)

设置用户自定义对象
Parameters:
Name Type Description
customObj * 用户自定义对象
Inherited From:
Overrides:

dispatchEvent(event)

发送事件消息,每个事件消息都有类型(type),所有监听此对象对应类型事件的监听者都会接收到相应的事件消息
Parameters:
Name Type Description
event string | module:events.Event 事件对象
Inherited From:
Overrides:

on(type, listener [, opt_this])

指定监听器监听指定类型的事件
Parameters:
Name Type Argument Default Description
type string 事件类型
listener callback | function 监听器
opt_this Object <optional>
target 在监听器中的`this`所指示的对象,默认是`target`自身
Inherited From:
Overrides:
Returns:
监听器的唯一标识.
Type
Object

once(type, listener [, opt_this])

指定监听器只监听一次指定类型的事件
Parameters:
Name Type Argument Default Description
type string 事件类型
listener callback | function 监听器
opt_this Object <optional>
target 在监听器中的`this`所指示的对象,默认是`target`自身
Inherited From:
Overrides:
Returns:
监听器的唯一标识.
Type
Object

un(type, listener [, opt_this])

取消指定监听器监听指定类型的事件
Parameters:
Name Type Argument Default Description
type string 事件类型
listener callback | function 监听器
opt_this Object <optional>
target 在监听器中的`this`所指示的对象,默认是`target`自身
Inherited From:
Overrides:

unByKey(key)

根据监听器的唯一标识取消指定监听器监听事件,监听器的唯一标识通过`on()`或者`once()`返回得到
Parameters:
Name Type Description
key Object | Array.<Object> 监听器的唯一标识,通过`on()`或者`once()`返回得到,可以是多个监听器的唯一标识数组
Inherited From:
Overrides: