riku
2024-04-29 113529424720f87ceb2e4604a4d2e1019e0db4f8
src/utils/map/index_old.js
@@ -8,6 +8,8 @@
var map;
// 卫星图层
var satellite;
// 地图拖动控制
var controlbar;
// 鼠标绘图
var mouseTool;
// 3D图层
@@ -53,19 +55,30 @@
  });
  // 添加卫星地图
  // satellite = new AMap.TileLayer.Satellite();
  // satellite.show();
  // map.add([satellite]);
  satellite = new AMap.TileLayer.Satellite();
  satellite.show();
  map.add([satellite]);
  _initControlbar();
  // _initMouseTool();
  _init3DLayer();
  _initDragEvent();
}
// 鼠标绘图初始化
function _initMouseTool() {
  mouseTool = new AMap.MouseTool(map);
function _initControlbar() {
  controlbar = new AMap.ControlBar({
    position: {
      right: '300px',
      top: '260px'
    }
  });
  map.addControl(controlbar);
}
// 鼠标绘图初始化
// function _initMouseTool() {
//   mouseTool = new AMap.MouseTool(map);
// }
// 3D图层初始化
function _init3DLayer() {
@@ -87,4 +100,13 @@
  });
}
export { createMap, onMapMounted, map, mouseTool, object3Dlayer, isDragging };
export {
  createMap,
  onMapMounted,
  map,
  controlbar,
  mouseTool,
  satellite,
  object3Dlayer,
  isDragging
};