From fe0b336af036e874203a978dd8e6391039ec545a Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期日, 28 四月 2024 16:19:18 +0800 Subject: [PATCH] 代码跟新 --- src/components/props/militaryPlot.vue | 346 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 303 insertions(+), 43 deletions(-) diff --git a/src/components/props/militaryPlot.vue b/src/components/props/militaryPlot.vue index b8bc70c..4488686 100644 --- a/src/components/props/militaryPlot.vue +++ b/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 @@ //娓呴櫎绯荤粺鍙扮珯锛岀洃娴嬬珯锛実b }, 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 () { -- Gitblit v1.9.3