| | |
| | | /* eslint-disable no-undef */ |
| | | // import '@/lib/AMap'; |
| | | import { useToolboxStore } from '@/stores/toolbox'; |
| | | |
| | | const toolboxStore = useToolboxStore(); |
| | | |
| | | var mapInitDone = false; |
| | | var onMapMountedEvents = []; |
| | |
| | | alwaysRender: false, |
| | | showLabel: true, |
| | | showBuildingBlock: true, |
| | | mapStyle: 'amap://styles/e1e78509de64ddcd2efb4cb34c6fae2a', |
| | | // mapStyle: 'amap://styles/e1e78509de64ddcd2efb4cb34c6fae2a', |
| | | features: ['bg', 'road'], |
| | | pitch: 45, // 地图俯仰角度,有效范围 0 度- 83 度 |
| | | viewMode: '3D', // 地图模式 |
| | | resizeEnable: true, |
| | | center: [121.6039283, 31.25295567], |
| | | zooms: [3, 18], |
| | | zooms: [0, 18], |
| | | zoom: 14 |
| | | }); |
| | | |
| | |
| | | satellite = new AMap.TileLayer.Satellite(); |
| | | satellite.show(); |
| | | map.add([satellite]); |
| | | toolboxStore.featuresStatus = true; |
| | | |
| | | _initControlbar(); |
| | | // _initMouseTool(); |
| | |
| | | } |
| | | }); |
| | | map.addControl(controlbar); |
| | | toolboxStore.controlbarStatus = true; |
| | | } |
| | | |
| | | // 鼠标绘图初始化 |