Skip to content

m-gis核心库 v0.4.4


m-gis核心库 / DivBoard

类: DivBoard

定义于: overlay/html/DivBoard.ts:40

用于三维中绘制 html 元素

// 添加动态扩散点 let layer = new HtmlLayer().addToViewer(this.$viewer); let divIcon = new DivIcon( new Position(118.78600228, 31.9135434, 1.66113721), <div> <div class="qe-animation-point" style="color:#f2fa19;"> <p></p> </div> </div> ).addToLayer(layer); divIcon.on(MouseEventType.CLICK, evt => { console.log(evt); });

继承

构造函数

构造函数

new DivBoard(position, content, options?): DivIcon

定义于: overlay/html/DivBoard.ts:48

参数

position

Position

坐标

content

string | HTMLElement

元素内容

options?

OPT

返回

DivIcon

重写了

Overlay.constructor

属性

_attr

_attr: any

定义于: overlay/Overlay.ts:26

继承自

Overlay._attr


_bid

_bid: any

定义于: overlay/Overlay.ts:17

继承自

Overlay._bid


_customData

_customData: any

定义于: overlay/Overlay.ts:29

继承自

Overlay._customData


_delegate

_delegate: any

定义于: overlay/Overlay.ts:21

继承自

Overlay._delegate


_distance

_distance: number = 0

定义于: overlay/html/DivBoard.ts:42


_id

_id: string | number

定义于: overlay/Overlay.ts:16

继承自

Overlay._id


_layer

_layer: any

定义于: overlay/Overlay.ts:22

继承自

Overlay._layer


_offset

_offset: number[]

定义于: overlay/html/DivBoard.ts:41


_options

_options: any

定义于: overlay/Overlay.ts:18

继承自

Overlay._options


_overlayEvent

_overlayEvent: OverlayEvent

定义于: overlay/Overlay.ts:28

继承自

Overlay._overlayEvent


_position

_position: any

定义于: overlay/Overlay.ts:19

继承自

Overlay._position


_positions

_positions: any

定义于: overlay/Overlay.ts:20

继承自

Overlay._positions


_relaters

_relaters: any

定义于: overlay/Overlay.ts:30

继承自

Overlay._relaters


_show

_show: boolean

定义于: overlay/Overlay.ts:24

继承自

Overlay._show


_state

_state: any

定义于: overlay/Overlay.ts:23

继承自

Overlay._state


_style

_style: any

定义于: overlay/Overlay.ts:25

继承自

Overlay._style


_zIndex

_zIndex: number = 1

定义于: overlay/html/DivBoard.ts:43


interactionEvents

interactionEvents: any[]

定义于: overlay/Overlay.ts:31

继承自

Overlay.interactionEvents


type

type: any

定义于: overlay/Overlay.ts:27

继承自

Overlay.type

访问器

attr

Getter 签名

get attr(): any

定义于: overlay/Overlay.ts:106

返回

any

Setter 签名

set attr(attr): void

定义于: overlay/Overlay.ts:102

覆盖物的额外属性设置

参数
attr

any

返回

void

继承自

Overlay.attr


center

Getter 签名

get center(): Position

定义于: overlay/Overlay.ts:137

返回

Position

继承自

Overlay.center


content

Getter 签名

get content(): string | HTMLElement

定义于: overlay/html/DivBoard.ts:100

返回

string | HTMLElement

Setter 签名

set content(content): void

定义于: overlay/html/DivBoard.ts:91

参数
content

string | HTMLElement

返回

void


customData

Getter 签名

get customData(): any

定义于: overlay/Overlay.ts:141

返回

any

继承自

Overlay.customData


delegate

Getter 签名

get delegate(): any

定义于: overlay/Overlay.ts:124

覆盖物的代理对象

返回

any

继承自

Overlay.delegate


distance

Getter 签名

get distance(): number

定义于: overlay/html/DivBoard.ts:116

返回

number

Setter 签名

set distance(distance): void

定义于: overlay/html/DivBoard.ts:112

参数
distance

number

返回

void


id

Getter 签名

get id(): any

定义于: overlay/Overlay.ts:78

返回

any

Setter 签名

set id(id): void

定义于: overlay/Overlay.ts:74

设置覆盖物的业务 id

参数
id

any

返回

void

继承自

Overlay.id


offset

Getter 签名

get offset(): number[]

定义于: overlay/html/DivBoard.ts:87

返回

number[]

Setter 签名

set offset(offset): void

定义于: overlay/html/DivBoard.ts:83

参数
offset

number[]

返回

void


overlayEvent

Getter 签名

get overlayEvent(): OverlayEvent

定义于: overlay/Overlay.ts:115

覆盖物的事件对象

返回

OverlayEvent

继承自

Overlay.overlayEvent


overlayId

Getter 签名

get overlayId(): string | number

定义于: overlay/Overlay.ts:61

覆盖物唯一标识

返回

string | number

继承自

Overlay.overlayId


position

Getter 签名

get position(): any

定义于: overlay/html/DivBoard.ts:79

返回

any

Setter 签名

set position(position): void

定义于: overlay/html/DivBoard.ts:75

参数
position

any

返回

void


relaters

Getter 签名

get relaters(): any[]

定义于: overlay/Overlay.ts:145

返回

any[]

继承自

Overlay.relaters


show

Getter 签名

get show(): boolean

定义于: overlay/html/DivBoard.ts:71

覆盖物的可见性

返回

boolean

Setter 签名

set show(show): void

定义于: overlay/html/DivBoard.ts:66

覆盖物的可见性

参数
show

boolean

返回

void

重写了

Overlay.show


state

Getter 签名

get state(): any

定义于: overlay/Overlay.ts:133

覆盖物的状态

返回

any

继承自

Overlay.state


transformOrigin

Getter 签名

get transformOrigin(): string

定义于: overlay/html/DivBoard.ts:108

返回

string

Setter 签名

set transformOrigin(origin): void

定义于: overlay/html/DivBoard.ts:104

参数
origin

string

返回

void


viewer

Getter 签名

get viewer(): any

定义于: overlay/Overlay.ts:52

返回

any

继承自

Overlay.viewer


zIndex

Getter 签名

get zIndex(): number

定义于: overlay/html/DivBoard.ts:125

返回

number

Setter 签名

set zIndex(zIndex): void

定义于: overlay/html/DivBoard.ts:120

参数
zIndex

number

返回

void

方法

_updateVisible()

_updateVisible(visible): void

定义于: overlay/html/DivBoard.ts:129

参数

visible

boolean

返回

void


addCustomData()

addCustomData(key, value): void

定义于: overlay/Overlay.ts:267

参数

key

any

value

any

返回

void

继承自

Overlay.addCustomData


addToLayer()

addToLayer(layer): DivIcon

定义于: overlay/Overlay.ts:260

添加到指定图层

参数

layer

any

指定图层

返回

DivIcon

继承自

Overlay.addToLayer


clearCustomData()

clearCustomData(): void

定义于: overlay/Overlay.ts:275

返回

void

继承自

Overlay.clearCustomData


clearRelate()

clearRelate(): void

定义于: overlay/Overlay.ts:288

返回

void

继承自

Overlay.clearRelate


eachRelaters()

eachRelaters(callback): void

定义于: overlay/Overlay.ts:292

参数

callback

any

返回

void

继承自

Overlay.eachRelaters


fire()

fire(type, params): DivIcon

定义于: overlay/Overlay.ts:339

触发事件

参数

type

string | number

params

any

返回

DivIcon

继承自

Overlay.fire


getCustomData()

getCustomData(key): any

定义于: overlay/Overlay.ts:271

参数

key

any

返回

any

继承自

Overlay.getCustomData


off()

off(type, callback, context?): true | DivIcon

定义于: overlay/html/DivBoard.ts:218

注销事件

参数

type

DivBoardEventType

事件类型

callback

any

监听回调

context?

any

返回

true | DivIcon

重写了

Overlay.off


on()

on(type, callback, context?): DivIcon | { listener: () => void; type: DivBoardEventType; }

定义于: overlay/html/DivBoard.ts:198

注册事件

参数

type

DivBoardEventType

事件类型

callback

any

监听回调

context?

any

返回

DivIcon | { listener: () => void; type: DivBoardEventType; }

重写了

Overlay.on


relate()

relate(overlay): void

定义于: overlay/Overlay.ts:279

参数

overlay

Overlay

返回

void

继承自

Overlay.relate


remove()

remove(): DivIcon

定义于: overlay/Overlay.ts:243

从图层上移出

返回

DivIcon

继承自

Overlay.remove


removeClass()

removeClass(className?): DivIcon

定义于: overlay/html/DivBoard.ts:258

移除class

参数

className?

string = ''

返回

DivIcon


setLabel()

setLabel(text, textStyle): DivIcon

定义于: overlay/Overlay.ts:229

设置文字标签

参数

text

string

指定文本的属性。支持显式换行符'\ n'。

textStyle

any

text 样式

返回

DivIcon

继承自

Overlay.setLabel


setStyle()

setStyle(style): DivIcon

定义于: overlay/html/DivBoard.ts:246

设置样式

参数

style

any

样式可选参数

返回

DivIcon


unRelate()

unRelate(overlay): void

定义于: overlay/Overlay.ts:283

参数

overlay

Overlay

返回

void

继承自

Overlay.unRelate


getOverlayType()

static getOverlayType(type): string | number | undefined

定义于: overlay/Overlay.ts:361

获取 Overlay 类型

参数

type

string

返回

string | number | undefined

继承自

Overlay.getOverlayType


registerType()

static registerType(type): void

定义于: overlay/Overlay.ts:349

Overlay 类型注册

参数

type

string

返回

void

继承自

Overlay.registerType

MGis 地理三维库