VmControlNavigation
导航组件为地图添加一个带缩放和罗盘按钮的控件。 参考
基础用法
API
Props
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| showCompass | If true the compass button is included. | boolean | true |
| showZoom | If true the zoom-in and zoom-out buttons are included. | boolean | true |
| visualizePitch | If true the pitch is visualized by rotating X-axis of compass. | boolean | false |
| position | position on the map to which the control will be added. | enum | 'top-right' |
Events
| 事件名 | 说明 | 类型 |
|---|---|---|
| beforeLoad | Triggers before the maplibreObject is loaded. | Function |
| ready | Triggers when the maplibreObject is successfully loaded. | Function |
| unready | Triggers when the maplibreObject loading failed. | Function |
| destroyed | Triggers when the maplibreObject is destroyed. | Function |
Exposes
| 名称 | 说明 | 类型 |
|---|---|---|
| load | Load the component manually. | Function |
| unload | Destroy the loaded component manually. | Function |
| reload | Load the component manually. | Function |
| creatingPromise | Determine whether the component is created by this. | object |
| maplibreObject | The maplibreObject created by component. | object |
| getMaplibreObject | Get the maplibreObject created by component. | Function |