surprise
2024-04-28 fe0b336af036e874203a978dd8e6391039ec545a
src/components/props/militaryPlot.vue
@@ -4,7 +4,7 @@
       id="moved2"
       @mousedown="moved">
    <div class="top">
      <span style="font-weight: bold">态势标绘</span>
      <span style="font-weight: bold">特效显示</span>
      <span class="close"
            @click="showtuli">X</span>
    </div>
@@ -44,45 +44,21 @@
      value2: false,
      ishowtuli: false,
      scale: 2.13,
      tileCoordinates: true,
      Option: [
        {
          name: '粗直箭头',
          type: 'StraightArrow',
          value: 'polygon',
          name: '瓦片坐标',
          type: '1',
        },{
          name: '地形三角网',
          type: '2',
        },{
          name: '卫星通讯链路',
          type: '3',
        },
        {
          name: '燕尾直箭头',
          type: 'SwallowtailArrow',
          value: 'polygon',
        },{
          name: '钳击箭头',
          type: 'PincerArrow',
          value: 'polygon',
        },{
          name: '集结地',
          type: 'GatheringPlace',
          value: 'polygon',
        },{
          name: '圆角矩形',
          type: 'RoundedRectangle',
          value: 'polygon',
        },
        {
          name: '扇形',
          type: 'Sector',
          value: 'polygon',
        },{
          name: '弓形',
          type: 'Bow',
          value: 'polygon',
        },{
          name: '攻击箭头',
          type: 'AttackArrow',
          value: 'polygon',
        },{
          name: '清除',
          type: 'Clear',
        }
      ],
    };
@@ -125,13 +101,297 @@
      //清除系统台站,监测站,gb
    },
    setMenuClick (res) {
      if(res.type=='Clear') {
        sgworld.Creator.ClearMilitaryStandard();
        return
      }
      if(res.type=='1') {
        window.sgworld.tileCoordinates=!window.sgworld.tileCoordinates;
      } else if(res.type=='2') {
        window.sgworld.wireframe=!window.sgworld.wireframe;
      } else if(res.type=='3') {
        if(window.CZML) {
          window.CZML.deleteObject();
          window.CZML=null
          window.CZML1.deleteObject();
          window.CZML1=null
          return
        }
        var czml=[
          {
            id: "document",
            name: "Link and Scan",
            version: "1.0",
          },
          {
            id: "Link_1",
            name: "Dynamic polyline with Reference Properties",
            availability: "2020-05-01T16:00:00Z/2020-05-01T16:01:00Z",
            polyline: {
              positions: {
                references: ["car#position","airplane#position"],
              },
            },
          },
          {
            id: "ConeRadar_1",
            position: {
              interpolationAlgorithm: "LINEAR",
              interpolationDegree: 1,
              epoch: "2020-05-01T16:00:00Z",
              cartographicDegrees: [
                0,117,20,500000,
                15,117,27,500000,
                30,124,27,500000,
                45,124,20,500000,
                60,117,20,500000
      sgworld.Creator.militaryPlotting(res.type,res.value,(entity) => {
      });
              ]
            },
            cylinder: {
              length: 1000000.0,
              topRadius: 0.0,
              bottomRadius: 200000.0,
            }
          },
          {
            id: "airplane",
            position: {
              interpolationAlgorithm: "LINEAR",
              interpolationDegree: 1,
              epoch: "2020-05-01T16:00:00Z",
              cartographicDegrees: [
                0,117,20,1000000,
                15,117,27,1000000,
                30,124,27,1000000,
                45,124,20,1000000,
                60,117,20,1000000
              ],
            },
            orientation: {
              "velocityReference": "#position"
            },
            model: {
              gltf: "http://103.135.160.14:9027/LHZH/ModelLibrary/太空/weixin.gltf",
              scale: 100
            },
          },
          {
            id: "car",
            position: {
              interpolationAlgorithm: "LINEAR",
              interpolationDegree: 1,
              epoch: "2020-05-01T16:00:00Z",
              cartographicDegrees: [
                0,117,20,0,
                15,117,27,0,
                30,124,27,0,
                45,124,20,0,
                60,117,20,0
              ],
            },
            orientation: {
              "velocityReference": "#position"
            },
            model: {
              gltf: 'http://103.135.160.14:9027/LHZH/ModelLibrary/Model/xiaoche.gltf',
              scale: 10000
            },
          },
          {
            id: "SectorScan_1",
            position: {
              reference: 'car#position'
            },
            orientation: {
              "velocityReference": "#position"
            },
            ellipse: {
              semiMinorAxis: 200000.0,
              semiMajorAxis: 200000.0,
              heightReference: 1,    //贴地
            },
          },
          {
            id: "Link_2",
            name: "Dynamic polyline with Reference Properties",
            availability: "2020-05-01T16:00:00Z/2020-05-01T16:01:00Z",
            polyline: {
              positions: {
                references: ["jd#position","car2#position"],
              },
            },
          },
          {
            id: "MultiCircleScan_2",
            position: {
              reference: 'car2#position'
            },
            ellipse: {
              semiMinorAxis: 200000.0,
              semiMajorAxis: 200000.0,
              heightReference: 1,    //贴地
            },
          },
          {
            id: "RadarScan_2",
            position: {
              reference: 'jd#position'
            },
            ellipse: {
              semiMinorAxis: 2000000.0,
              semiMajorAxis: 2000000.0,
              heightReference: 1,    //贴地
            },
          },
        ];
        var czml1=[
          {
            id: "document",
            name: "Link and Scan",
            version: "1.0",
          },
          {
            id: "Link_1",
            name: "Dynamic polyline with Reference Properties",
            availability: "2020-05-01T16:00:00Z/2020-05-01T16:01:00Z",
            polyline: {
              positions: {
                references: ["car#position","airplane#position"],
              },
            },
          },
          {
            id: "ConeRadar_1",
            position: {
              interpolationAlgorithm: "LINEAR",
              interpolationDegree: 1,
              epoch: "2020-05-01T16:00:00Z",
              cartographicDegrees: [
                0,123,26,500000,
                15,123,21,500000,
                30,118,21,500000,
                45,118,26,500000,
                60,123,26,500000
              ]
            },
            cylinder: {
              length: 1000000.0,
              topRadius: 0.0,
              bottomRadius: 200000.0,
            }
          },
          {
            id: "airplane",
            position: {
              interpolationAlgorithm: "LINEAR",
              interpolationDegree: 1,
              epoch: "2020-05-01T16:00:00Z",
              cartographicDegrees: [
                0,123,26,1000000,
                15,123,21,1000000,
                30,118,21,1000000,
                45,118,26,1000000,
                60,123,26,1000000
              ],
            },
            orientation: {
              "velocityReference": "#position"
            },
            model: {
              gltf: "http://103.135.160.14:9027/LHZH/ModelLibrary/太空/weixin.gltf",
              scale: 100
            },
          },
          {
            id: "car",
            position: {
              interpolationAlgorithm: "LINEAR",
              interpolationDegree: 1,
              epoch: "2020-05-01T16:00:00Z",
              cartographicDegrees: [
                0,123,26,0,
                15,123,21,0,
                30,118,21,0,
                45,118,26,0,
                60,123,26,0
              ],
            },
            orientation: {
              "velocityReference": "#position"
            },
            model: {
              gltf: 'http://103.135.160.14:9027/LHZH/ModelLibrary/Model/xiaoche.gltf',
              scale: 10000
            },
          },
          {
            id: "SectorScan_1",
            position: {
              reference: 'car#position'
            },
            orientation: {
              "velocityReference": "#position"
            },
            ellipse: {
              semiMinorAxis: 200000.0,
              semiMajorAxis: 200000.0,
              heightReference: 1,    //贴地
            },
          },
          {
            id: "Link_2",
            name: "Dynamic polyline with Reference Properties",
            availability: "2020-05-01T16:00:00Z/2020-05-01T16:01:00Z",
            polyline: {
              positions: {
                references: ["jd#position","car2#position"],
              },
            },
          },
          {
            id: "MultiCircleScan_2",
            position: {
              reference: 'car2#position'
            },
            ellipse: {
              semiMinorAxis: 200000.0,
              semiMajorAxis: 200000.0,
              heightReference: 1,    //贴地
            },
          },
          {
            id: "RadarScan_2",
            position: {
              reference: 'jd#position'
            },
            ellipse: {
              semiMinorAxis: 2000000.0,
              semiMajorAxis: 2000000.0,
              heightReference: 1,    //贴地
            },
          },
        ];
        var option={
          coneRadarColor: '#00ff00', //卫星雷达颜色(可选),
          sectorScanAngle: 360,    //扇形扩散角度(可选),
          radarScanColor: '#00ffff',    //雷达扫描颜色(可选)
        }
        window.CZML=sgworld.Creator.CZML(czml,option,function(dataSources) {
          Viewer.zoomTo(dataSources);
        });
        window.CZML1=sgworld.Creator.CZML(czml1,option,function(dataSources) {
        });
      }
    }
  },
  mounted () {