Abstract class for map interaction handlers
映射交互处理程序的抽象类
Methods
| Method | Returns | Description |
|---|---|---|
enable() |
this |
Enables the handler
启用处理程序 |
disable() |
this |
Disables the handler
禁用处理程序 |
enabled() |
Boolean |
Returns true if the handler is enabled
如果启用了处理程序,则返回true |
Extension methods
扩展方法
从Handler继承的类必须实现以下两个方法:
| Method | Returns | Description |
|---|---|---|
addHooks() |
|
Called when the handler is enabled, should add event hooks.
在启用处理程序时调用,应添加事件挂钩。 |
removeHooks() |
|
Called when the handler is disabled, should remove the event hooks added previously.
当处理程序被禁用时调用,应删除之前添加的事件挂钩。 |
Functions
There is static function which can be called without instantiating L.Handler:
有一个静态函数可以在不实例化L.Handler的情况下调用:
| Function | Returns | Description |
|---|---|---|
addTo(<Map> map, <String> name) |
this |
Adds a new Handler to the given map with the given name.
向具有给定名称的给定映射添加新的处理程序。 |
Handlermust implement the two following methods: