Control Class

Uses: Evented
Module: Control
Parent Module: UI

地图相关的接口。

The Control class mixes in Evented methods.

Show:

Index

Properties

Events

Methods

addTo

(map)

添加到地图

Parameters:

  • map Map

    地图对象

Returns:

Control

this

remove

()

删除control

Returns:

Control

this

on

(typelistener)
Inherited from Evented:

添加一个具体的事件监听

Parameters:

  • type String
    事件类型
  • listener Function
    监听器

Returns:

Object
this

off

(typelistener)
Inherited from Evented:

注销一个事件监听

Parameters:

  • type String (optional)
    事件类型
  • listener Function (optional)
    监听器,如果忽略此项,所有此类型的事件将会全部删除。

Returns:

Object
this

once

(typelistener)
Inherited from Evented:

添加一个只执行一次的事件。

Parameters:

  • type String
    事件类型
  • listener Function
    事件监听器

Returns:

Object
this

fire

(typedata)
Inherited from Evented:

触发一个类型的事件

Parameters:

  • type String
    事件类型
  • data Object (optional)
    传输到其它监听器里面的数据

Returns:

Object
this

listens

(type)
Inherited from Evented:

返回一个布尔值标识是否有其它的监听器监听该事件。

Parameters:

  • type String
    时间类型

Returns:

Boolean
true 是否有监听器的标识位。

Properties

Events