Class: MapControl

MapControl

地图控制类


new MapControl(config)

构造函数

Parameters:
Name Type Description
config Object

config

Properties
Name Type Description
moveSpeed number

移动速度

pitchSpeed number

角度改变速度

rotateSpeed number

旋转速度

Source:

Extends

Methods


listenEvents()

监听事件

Source:

removeListenr()

移除所有监听事件

Source:

on()

事件监听,用法同jQuery.on

Inherited From:
Overrides:
Source:

fire()

触发事件

Inherited From:
Overrides:
Source:
Example
this.fire("change",event)

off()

关闭事件

Inherited From:
Overrides:
Source:
Example
this.off('change',onChange)

onAdd(map)

地图添加图层时调用,由子类实现

Parameters:
Name Type Description
map Map

PigeonGL.Map实例

Inherited From:
Overrides:
Source:

update()

地图每帧调用该函数

Inherited From:
Overrides:
Source:

onRemove()

移除图层时调用

Inherited From:
Overrides:
Source:

addLayer(layer)

添加图层

Parameters:
Name Type Description
layer Layer

图层

Inherited From:
Overrides:
Source:

removeLayer(layer)

删除图层

Parameters:
Name Type Description
layer Layer

图层

Inherited From:
Overrides:
Source:

getLayerById()

获取图层通过id

Inherited From:
Overrides:
Source:

Events


move

地图移动

Properties:
Name Type Description
event Object
Source:

rotate

地图旋转

Properties:
Name Type Description
event Object
Source:

zoom

地图缩放

Properties:
Name Type Description
event Object

原生event对象

Source:

change

地图状态发生改变,发生操作时触发

Properties:
Name Type Description
event Object

原生event对象

Source: