Leaflet 地图开发–Leaflet Map Handler—映射交互处理程序的抽象类

Leaflet 地图开发–Leaflet Map Handler—映射交互处理程序的抽象类

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

扩展方法

Classes inheriting from Handler must implement the two following 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(<Mapmap, <String> name) this Adds a new Handler to the given map with the given name.

向具有给定名称的给定映射添加新的处理程序。

5 1 投票
文章评分
订阅评论
提醒
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x