riku
2024-05-13 d277d770292df0a1266c07f4773d62edd70e6515
src/utils/map/toolbox.js
@@ -1,6 +1,9 @@
/* eslint-disable no-undef */
import { map, satellite, controlbar } from './index_old';
import { map, satellite } from './index_old';
import { useToolboxStore } from '@/stores/toolbox';
// import '@/lib/jquery-3.5.1.min';
const toolboxStore = useToolboxStore();
/**
 * 坐标拾取鼠标点击回调事件
@@ -42,6 +45,7 @@
   */
  toggleFeatures(value) {
    value ? map.setFeatures(['bg', 'road', 'point', 'building']) : map.setFeatures(['bg', 'road']);
    toolboxStore.featuresStatus = value;
  },
  /**
@@ -50,6 +54,7 @@
   */
  toggleSatellite(value) {
    value ? satellite.show() : satellite.hide();
    toolboxStore.satelliteStatus = value;
  },
  /**
@@ -59,6 +64,7 @@
  toggleControlbar(value) {
    // value ? controlbar.show() : controlbar.hide();
    value ? $('.amap-controlbar').show() : $('.amap-controlbar').hide();
    toolboxStore.controlbarStatus = value;
  },
  /**
@@ -74,5 +80,6 @@
      _locationMarker = undefined;
      _locationText = undefined;
    }
    toolboxStore.coorPickStatus = value;
  }
};