Appearance
NavigationControl
NavigationControl
导航控件,添加缩放地图按钮
Examples
javascript
const nCtrol = new DiMap.NavigationControl({
showCompass: true, // 显示罗盘
showZoom: true, // 显示zoom级别
visualizePitch: true // 按钮可视化俯仰角
})
map.addControl(nCtrol,"top-left") // 添加到地图左上角(默认右上角)constructor
构造函数
参数
| 参数名 | 必选 | 类型 | 描述 |
|---|---|---|---|
| options.showCompass | 否 | boolean | undefined | 是否显示指南针,默认为 true |
| options.showZoom | 否 | boolean | undefined | 是否显示缩放控件,默认为 true |
| options.visualizePitch | 否 | boolean | undefined | 是否可视化地显示倾斜角度,默认为 false |