Skip to content

m-gis核心库 v0.4.4


m-gis核心库 / Layer

类: Layer

定义于: layer/Layer.ts:10

继承于

构造函数

构造函数

new Layer(options?): Layer

定义于: layer/Layer.ts:27

参数

options?

any = {}

返回

Layer

属性

_attr

_attr: any

定义于: layer/Layer.ts:19


_cache

_cache: any

定义于: layer/Layer.ts:18


_delegate

_delegate: any

定义于: layer/Layer.ts:15


_enableZoomShow

_enableZoomShow: boolean

定义于: layer/Layer.ts:26


_id

_id: any

定义于: layer/Layer.ts:11


_layerEvent

_layerEvent: any

定义于: layer/Layer.ts:21


_layerOptions

_layerOptions: any

定义于: layer/Layer.ts:12


_name

_name: any

定义于: layer/Layer.ts:13


_show

_show: any

定义于: layer/Layer.ts:17


_state

_state: any

定义于: layer/Layer.ts:22


_style

_style: any

定义于: layer/Layer.ts:20


_viewer

_viewer: any

定义于: layer/Layer.ts:16


_zIndex

_zIndex: any

定义于: layer/Layer.ts:14


maxZoom

maxZoom: any

定义于: layer/Layer.ts:25


minZoom

minZoom: any

定义于: layer/Layer.ts:24


type

type: any

定义于: layer/Layer.ts:23

访问器

attr

Getter 签名

get attr(): any

定义于: layer/Layer.ts:105

返回

any

Setter 签名

set attr(attr): void

定义于: layer/Layer.ts:101

用于设置图层的一些额外属性

参数
attr

any

返回

void


delegate

Getter 签名

get delegate(): any

定义于: layer/Layer.ts:127

图层代理对象

返回

any


id

Getter 签名

get id(): any

定义于: layer/Layer.ts:118

图层唯一标识 id

返回

any


layerEvent

Getter 签名

get layerEvent(): any

定义于: layer/Layer.ts:93

图层事件对象

返回

any


layerOptions

Getter 签名

get layerOptions(): any

定义于: layer/Layer.ts:84

图层设置的参数对象

返回

any


name

Getter 签名

get name(): any

定义于: layer/Layer.ts:58

获取当前图层名称

返回

any


overlays

Getter 签名

get overlays(): Overlay[]

定义于: layer/Layer.ts:140

返回

Overlay[]


show

Getter 签名

get show(): any

定义于: layer/Layer.ts:75

返回

any

Setter 签名

set show(show): void

定义于: layer/Layer.ts:67

图层是否可见

默认值
ts
@public
参数
show

any

返回

void


state

Getter 签名

get state(): any

定义于: layer/Layer.ts:136

图层状态

返回

any

方法

_addedHook()

_addedHook(): void

定义于: layer/Layer.ts:144

返回

void


_addHandler()

_addHandler(viewer): Promise<void>

定义于: layer/Layer.ts:148

参数

viewer

Viewer

返回

Promise<void>


_addOverlay()

_addOverlay(overlay): void

定义于: layer/Layer.ts:223

参数

overlay

any

返回

void


_init()

_init(): void

定义于: layer/Layer.ts:182

返回

void


_removedHook()

_removedHook(): void

定义于: layer/Layer.ts:146

返回

void


_removeHandler()

_removeHandler(): false | undefined

定义于: layer/Layer.ts:189

返回

false | undefined


_removeOverlay()

_removeOverlay(overlay): void

定义于: layer/Layer.ts:230

参数

overlay

Overlay | PrimitiveOverlay

返回

void


addOverlay()

addOverlay(overlay): Layer

定义于: layer/Layer.ts:261

往图层上添加 overlay

参数

overlay

any

overlay

返回

Layer

Layer


addOverlays()

addOverlays(overlays): Layer

定义于: layer/Layer.ts:285

往图层上添加 overlay 的数组

参数

overlays

Overlay[]

overlay 数组

返回

Layer

Layer


addToViewer()

addToViewer(viewer): Layer

定义于: layer/Layer.ts:272

将图层添加到 Viewer

参数

viewer

Viewer

指定的 viewer

返回

Layer

Layer


eachOverlay()

eachOverlay(method, context): Layer

定义于: layer/Layer.ts:364

遍历每个 Overlay 并将其作为参数传递给回调函数

参数

method

any

回调函数

context

any

上下文环境

返回

Layer

Layer


getOverlay()

getOverlay(overlayId): any

定义于: layer/Layer.ts:311

通过 overlayId 获取对应 Overlay

参数

overlayId

string

overlay id

返回

any

overlay


getOverlayById()

getOverlayById(id): undefined

定义于: layer/Layer.ts:315

参数

id

string | number

返回

undefined


getOverlays()

getOverlays(): Overlay[]

定义于: layer/Layer.ts:376

获取图层上所有 overlays

返回

Overlay[]

overlays


getOverlaysByAttr()

getOverlaysByAttr(attrName, attrVal): Overlay[]

定义于: layer/Layer.ts:347

通过属性名,属性值获取 overlays

参数

attrName

string

属性名

attrVal

string

属性值

返回

Overlay[]

overlays


getOverlaysByType()

getOverlaysByType(type): Overlay[]

定义于: layer/Layer.ts:330

通过类型获取 overlays

参数

type

string | number

类型

返回

Overlay[]

overlay


remove()

remove(): void

定义于: layer/Layer.ts:388

移除图层

返回

void


removeOverlay()

removeOverlay(overlay): Layer

定义于: layer/Layer.ts:300

从图层上移出 overlay

参数

overlay

Overlay | PrimitiveOverlay

overlay

返回

Layer

Layer


tick()

tick(zoom): void

定义于: layer/Layer.ts:237

参数

zoom

number

返回

void

MGis 地理三维库