VmControlTerrain
地形控件为地图添加一个控制地形是否显示的按钮。 参考
基础用法
API
Props
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| source | The name of terrain source. | string | - |
| exaggeration | multiplicator for the elevation. Used to make terrain more "extreme". | number | - |
| position | position on the map to which the control will be added. | enum | 'top-right' |
Events
| Name | Description | Type |
|---|---|---|
| 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
| Name | Description | Type |
|---|---|---|
| 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 |