月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-07-05 52cf8c657bab61b93b138c8677472d7a3ce8405f
src/assets/js/Map/menuTool.js
@@ -44,7 +44,7 @@
        this.createSimpleGraphic("rectangle");
        break;
      case "c6": //多边形
        this.createSimpleGraphic("polyhedron");
        this.createSimpleGraphic("polygon");
        break;
      case "d2"://等高线分析
        break
@@ -178,7 +178,7 @@
    this.squareOjb.push(e);
    // earthCtrl.Creator.SimpleGraphic.clear();
    Viewer.entities.remove(entity);
    debugger
    window.functionForJs({
      type: 'exportMap',
      value: true
@@ -186,7 +186,8 @@
  },
  // 创建图形
  createSimpleGraphic(type, scene) {
    earthCtrl.Creator.createSimpleGraphic(type, {}, (entity) => {
    sgworld.Creator.createSimpleGraphic(type, {}, (entity) => {
      if (scene === "square") {
        this.createRectangle(entity);
      }
@@ -229,12 +230,27 @@
  },
  //平面面积
  planeDistance() {
    earthCtrl.analysis.getPlaneArea(function (e) { });
    // earthCtrl.analysis.getPlaneArea(function (e) { });
    var colorAll = {
      point: Cesium.Color.fromCssColorString("#ff0000"),
      polyline: Cesium.Color.fromCssColorString("#ffff0050"),
      polygon: Cesium.Color.fromCssColorString("#ffff0050"),
    };
    sgworld.Analysis.planeArea(colorAll, () => {
    });
  },
  //表面距离
  surfaceDistance() {
    earthCtrl.analysis.getDistanceHorizontal(function (e) {
      console.info(e);
    // earthCtrl.analysis.getDistanceHorizontal(function (e) {
    //   console.info(e);
    // });
    var colorAll = {
      point: Cesium.Color.fromCssColorString("#ff0000"),
      polyline: Cesium.Color.fromCssColorString("#ffff0050"),
      polygon: Cesium.Color.fromCssColorString("#ffff0050"),
    };
    sgworld.Analysis.horizontalDistance(colorAll, () => {
    });
  },
  //点漫游