Skip to content

NavigationControl

导航控件,添加缩放地图按钮

继承Control
实现IControl

Examples

javascript
const nCtrol = new NavigationControl({
 showCompass: true, // 显示罗盘
 showZoom: true, // 显示zoom级别
 visualizePitch: true // 按钮可视化俯仰角
})
map.addControl(nCtrol, "right-right")

constructor

构造函数

Parameters

  • options {showCompass: (boolean | undefined)?, showZoom: (boolean | undefined)?, visualizePitch: (boolean | undefined)?}? 可选参数对象。

    • options.showCompass 是否显示指南针,默认为 true。
    • options.showZoom 是否显示缩放控件,默认为 true。
    • options.visualizePitch 是否可视化地显示倾斜角度,默认为 false。