Icontrol

概述

控件类接口( zoom, attribution, scale and layers controls)

方法(Methods)

方法:

方法 参数 返回值 描述
onAdd() <Map>map HTMLElement 应当包含创建一个DOM元素所需的所有代码,添加相应的事件监听,然后返回包含这个控件的元素,map.addControl(control) or control.addTo(map)
onRemove() <Map>map - 可选参数,包含所有应清除的代码(例如:移除一个控件所有的事件监听)map.removeControl(control) 或 control.removeFrom(map),这个控件的DOM容器将会自动移除

results matching ""

    No results matching ""