地图组件用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例、比例尺
L7 目前支持 Control
- Zoom 放大缩小
- Scale 比例尺
- Layers 图层列表
组件介绍:
import {
Scene, Control } from '@antv/l7';
const legend = new Control({
position: 'topleft'
})
position: string 控件位置支持 8 个方位
- bottomright
- topright
- bottomleft
- topleft
- topcenter
- bottomcenter
- leftcenter
- rightcenter
//初始化
const scene = new Scene(