control~Zoom(options)

缩放控件,当前版本可直接通过Map对象属性进行控制

Summary

Methods:
activate

激活控件

deactivate

禁用控件,取消事件绑定

getControlType

获取数据类型

setTouchMinDistance

设置触发缩放的双指间移动间距

Constructor

new Zoom(options)

Parameters:
Name Type Description
options Object

可选项

Name Type Description
touchMinDistance Number

移动端适配,当前双指间距据和移动前双指间距大于此值时(单位: 像素),触发缩放

Example
let zoom = new hmap.control.Zoom()
map.addControl(zoom)

Methods

activate() → {module:control~Zoom}

激活控件

deactivate()

禁用控件,取消事件绑定

getControlType() → {String}

获取数据类型

Returns:
String

setTouchMinDistance(touchMinDistance)

设置触发缩放的双指间移动间距

Parameters:
Name Type Description
touchMinDistance Number

触发缩放的双指间移动间距(单位:像素)