From 1a4baeaad4e5cbc721a128867f6f2391b764f96b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Mon, 17 Nov 2025 14:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9E=E8=A1=8C=E6=BC=AB=E6=B8=B8=E5=BD=95?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/public/sdk/YJEarth.min.js | 2 +- src/renderer/public/sdk/custom/css/index.css | 4 +-- src/renderer/src/icons/svg/video.svg | 1 + .../views/components/propertyBox/FlyRoam.vue | 36 ++++++++++++++++++- 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 src/renderer/src/icons/svg/video.svg diff --git a/src/renderer/public/sdk/YJEarth.min.js b/src/renderer/public/sdk/YJEarth.min.js index 5b4ee2a..17b7b09 100644 --- a/src/renderer/public/sdk/YJEarth.min.js +++ b/src/renderer/public/sdk/YJEarth.min.js @@ -1,4 +1,4 @@ -/*! update time: 2025/11/17 13:38:46*/!function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=41)}([function(e,t,i){var n=i(42)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(36);function o(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0,t=Array.from(h[e].keys());t.forEach((function(t){document.documentElement.style.setProperty(t,h[e].get(t))}))}h[0].set("--color-sdk-base-rgb","0, 255, 255"),h[0].set("--color-sdk-gradual","rgb(0, 255, 255) 6.25%, rgb(0, 200, 255) 100%"),h[0].set("--color-sdk-bg-gradual","#00ffff33 0%, #00ffff00 100%"),h[0].set("--color-sdk-text-shadow","rgba(20, 118, 255, 1)"),h[1].set("--color-sdk-base-rgb","42, 200, 251"),h[1].set("--color-sdk-gradual","rgb(42, 200, 251) 6.25%, rgb(42, 145, 251) 100%"),h[1].set("--color-sdk-bg-gradual","#2ac8fb33 0%, #2ac8fb00 100%"),h[1].set("--color-sdk-text-shadow","rgba(20, 63, 255, 1)"),h[2].set("--color-sdk-base-rgb","187, 26, 41"),h[2].set("--color-sdk-gradual","rgb(187, 26, 41) 6.25%, rgb(236, 20, 20) 100%"),h[2].set("--color-sdk-bg-gradual","#bb1a2933 0%, #bb1a2900 100%"),h[2].set("--color-sdk-text-shadow","rgba(246, 8, 30, 1)");var m=i(10),f=i(12),v=i(23),g=i(16);function y(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return b(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i2&&void 0!==h[2]?h[2]:3,o=new u.a(t),a=i.orientation,!i.position){e.next=13;break}if(0===i.position.alt||i.position.alt){e.next=8;break}return e.next=7,o.getClampToHeight(i.position);case 7:i.position.alt=e.sent;case 8:r=0,a||(r=500),s=Cesium.Cartesian3.fromDegrees(i.position.lng,i.position.lat,i.position.alt+r),e.next=15;break;case 13:c=o.cal_envelope(i.positions),s=new Cesium.Rectangle(Cesium.Math.toRadians(c[3][0]),Cesium.Math.toRadians(c[3][1]),Cesium.Math.toRadians(c[1][0]),Cesium.Math.toRadians(c[1][1]));case 15:F(t),t.viewer.camera.flyTo({destination:s,duration:n,orientation:a,complete:i.complete});case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&e.viewer){var i=e.viewer;i.scene.screenSpaceCameraController.enableRotate=t,i.scene.screenSpaceCameraController.enableTranslate=t,i.scene.screenSpaceCameraController.enableZoom=t,i.scene.screenSpaceCameraController.enableTilt=t,i.scene.screenSpaceCameraController.enableLook=t}}function N(e,t){if(e&&e.viewer){S[e.viewer._element.className]||(S[e.viewer._element.className]={}),S[e.viewer._element.className].event&&S[e.viewer._element.className].event.destroy();var i=new u.a(e),n=e.viewer._element,o=e.proj,s=function(){switch(r){case"compass":var s=n.getElementsByClassName("compass")[0],u=n.getElementsByClassName("navigation-controls")[0];t[r]?(s&&(s.style.display="block"),u&&(u.style.display="flex")):(s&&(s.style.display="none"),u&&(u.style.display="none"));break;case"legend":var h=n.getElementsByClassName("distance-legend")[0];t[r]?h&&(h.parentNode.style.display="block"):h&&(h.parentNode.style.display="none");break;case"info":var p=n.getElementsByClassName("cesium-info")[0];if(t[r]){var d=function(){var t=a()(l.a.mark((function t(){var n,s;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(C){t.next=2;break}return t.abrupt("return");case 2:if(n=i.cartesian3Towgs84(C,e.viewer),"EPSG:4326"!==w){t.next=16;break}t.t0=k||"度",t.next="度"===t.t0?7:"度分"===t.t0?9:"度分秒"===t.t0?11:13;break;case 7:return p.innerHTML="\n
经度:".concat(Number(n.lng.toFixed(6)),"°
\n
纬度:").concat(Number(n.lat.toFixed(6)),"°
\n
高程:").concat(Number(n.alt.toFixed(2)),"米
\n "),t.abrupt("break",14);case 9:return p.innerHTML="\n
经度:".concat(o.degreesToDMS(n.lng,!0),"
\n
纬度:").concat(o.degreesToDMS(n.lat,!0),"
\n
高程:").concat(Number(n.alt.toFixed(2)),"米
\n "),t.abrupt("break",14);case 11:return p.innerHTML="\n
经度:".concat(o.degreesToDMS(n.lng,!1),"
\n
纬度:").concat(o.degreesToDMS(n.lat,!1),"
\n
高程:").concat(Number(n.alt.toFixed(2)),"米
\n "),t.abrupt("break",14);case 13:return t.abrupt("break",14);case 14:t.next=18;break;case 16:(s=o.convert([{x:n.lng,y:n.lat,z:n.alt}],"EPSG:4326",q(w,n))).points.length&&(p.innerHTML="\n
x:".concat(Number(s.points[0].x.toFixed(6)),'
\n
y:').concat(Number(s.points[0].y.toFixed(6)),'
\n
z:').concat(Number(s.points[0].z.toFixed(6)),"
\n "));case 18:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();p?(d(),p.style.display="block"):((p=document.createElement("div")).className="cesium-info",p.style.position="absolute",p.style.bottom="32px",p.style.right="240px",p.style["font-size"]="14px",p.style["background-color"]="rgba(47,53,60,.8)",p.style.color="#fff",p.style.padding="4px 10px",p.style["border-radius"]="18px",p.style.display="flex",p.innerHTML="EPSG:4326"===w?"\n
经度:-
\n
纬度:-
\n
高程:-
\n ":"\n
x:-
\n
y:-
\n
z:-
\n ",e.viewer._element.appendChild(p));var m=new c.a(e);S[e.viewer._element.className].event=m;m.mouse_move((function(e,t){C=t,d()}))}else p&&(p.style.display="none");break;case"frame":t[r]?(e.viewer.scene.debugShowFramesPerSecond=!0,setTimeout((function(){var t=e.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0],i=t.getElementsByClassName("cesium-performanceDisplay-defaultContainer")[0];i&&t.appendChild(i)}),50)):e.viewer.scene.debugShowFramesPerSecond=!1}};for(var r in t)s()}}function B(e,t){t=t?"billboard_default_url_"+t:"billboard_default_url";var i=Object(g.a)();e.startsWith("http")||(e.includes(":")||i&&(e=new URL(e,i).href));localStorage.setItem(t,e)}function j(e){return e=e?"billboard_default_url_"+e:"billboard_default_url",localStorage.getItem(e)}function A(e,t){_=!!t,Object(v.e)(e.viewer)}function L(){return _}function I(e,t){e&&e.viewer&&(x[e.viewer._element.className]||(x[e.viewer._element.className]={}),x[e.viewer._element.className].status=t,x[e.viewer._element.className].MoveHandler&&x[e.viewer._element.className].MoveHandler.destroy(),t&&(x[e.viewer._element.className].MoveHandler=new Cesium.ScreenSpaceEventHandler(e.viewer.canvas),x[e.viewer._element.className].MoveHandler.setInputAction((function(t){var i=e.viewer.scene.pick(t.endPosition),n=x[e.viewer._element.className].selectedId,o=e.entityMap.get(x[e.viewer._element.className].id);if(o&&o.features.has(n)){var s=o.features.get(n).features;for(var a in s)if(s[a].content._model){var r=s[a].customColor||Cesium.Color.fromCssColorString("#fff");s[a].color=Cesium.Color.fromCssColorString("rgba(".concat(Cesium.Color.floatToByte(r.red),",").concat(Cesium.Color.floatToByte(r.green),",").concat(Cesium.Color.floatToByte(r.blue),",").concat(r.alpha*(s[a].customAlpha||0===s[a].customAlpha?s[a].customAlpha:1),")"))}}if(i&&i.content)if("bim"===e.getIncetance(i.content.tileset.id).type){if(i.primitive&&i.primitive.id){var l=e.entityMap.get(i.primitive.id);if(n=i.getProperty("id"),l.features.has(n)){var c=l.features.get(n).features;for(var u in c)c[u].content._model&&(c[u].color=Cesium.Color.fromCssColorString("#ffeb3b"))}x[e.viewer._element.className].id=i.primitive.id,x[e.viewer._element.className].selectedId=n}}else i.primitive.id=null}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)))}function R(e){if(e&&e.viewer)return!!x[e.viewer._element.className]&&x[e.viewer._element.className].status}function z(e,t){if(e&&e.viewer)if(se(0),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),e.entityMap.forEach((function(e){e.editObj&&e.editObj.destroy(),e.ControllerObject&&e.ControllerObject.destroy()})),E[e.viewer._element.className]||(E[e.viewer._element.className]={}),E[e.viewer._element.className].animate&&TWEEN.remove(E[e.viewer._element.className].animate),E[e.viewer._element.className].event&&E[e.viewer._element.className].event.destroy(),t){var i=Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),n=Cesium.Math.toDegrees(e.viewer.camera.heading),o=Cesium.Cartesian3.distance(e.viewer.camera.position,i);T(e,!1);var s=e.viewer.camera.pitch;Cesium.Math.toDegrees(s)<-89.99&&(s=Cesium.Math.toRadians(-89.99)),E[e.viewer._element.className].animate=new TWEEN.Tween({angle:n}).to({angle:n-360},3e4).easing(TWEEN.Easing.Linear.None).repeat(1/0).onUpdate(function(){var t=a()(l.a.mark((function t(n,a){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.viewer){t.next=3;break}return TWEEN.remove(E[e.viewer._element.className].animate),t.abrupt("return");case 3:e.viewer.camera.lookAt(i,new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n.angle),s,o)),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);case 5:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}()).start();var r=new c.a(e);E[e.viewer._element.className].event=r,r.mouse_left_down((function(){E[e.viewer._element.className].animate&&TWEEN.remove(E[e.viewer._element.className].animate),E[e.viewer._element.className].event&&E[e.viewer._element.className].event.destroy(),T(e,!0),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)}))}else T(e,!0)}function F(e){e&&e.viewer&&E[e.viewer._element.className]&&(E[e.viewer._element.className].animate&&TWEEN.remove(E[e.viewer._element.className].animate),E[e.viewer._element.className].event&&E[e.viewer._element.className].event.destroy(),T(e,!0),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY))}function H(e){if(e&&e.entityMap){var t,i=y(e.entityMap);try{for(i.s();!(t=i.n()).done;){var n=o()(t.value,2),s=(n[0],n[1]);"TrajectoryMotion"===s.type&&s.viewFollow&&(s.viewFollow=!1)}}catch(e){i.e(e)}finally{i.f()}}}function V(e,t){if(e){var i,n=Object(f.a)().sdkD;n&&e!==n&&V(n,t);for(var o=0;o经度:".concat(Number(s.lng.toFixed(6)),"° \n
纬度:").concat(Number(s.lat.toFixed(6)),"°
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!0),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!0),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分秒":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!1),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!1),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ")}else{var a=o.convert([{x:s.lng,y:s.lat,z:s.alt}],"EPSG:4326",q(w,s));i.innerHTML="\n
x:".concat(Number(a.points[0].x.toFixed(6)),'
\n
y:').concat(Number(a.points[0].y.toFixed(6)),'
\n
z:').concat(Number(a.points[0].z.toFixed(6)),"
\n ")}}}}function q(e,t){var i;switch(e){case"EPSG:32601":var n=Math.floor((t.lng+180)/6+1);i=t.lat>0?"EPSG:"+(i=32600+n):"EPSG:"+(i=32700+n);break;case"EPSG:4534":i="EPSG:"+(i=Math.round(t.lng/3)-25+4534);break;case"EPSG:4513":i="EPSG:"+(i=Math.round(t.lng/3)-25+4513);break;case"EPSG:4502":var o=Math.floor(t.lng/6)+31;o<13&&(o=13),o>23&&(o=23),i="EPSG:"+(i=o-13+4502);break;case"EPSG:4491":var s=Math.floor(t.lng/6)+31;s<13&&(s=13),s>23&&(s=23),i="EPSG:"+(i=s-13+4491)}return i}function X(){return k}function Z(e,t){if("EPSG:4326"===w&&(k=t,e&&e.viewer&&e.viewer._element)){var i=e.viewer._element.getElementsByClassName("cesium-info")[0];if(C&&i){var n=new u.a,o=e.proj,s=n.cartesian3Towgs84(C,e.viewer);switch(t){case"度":i.innerHTML="\n
经度:".concat(Number(s.lng.toFixed(6)),"°
\n
纬度:").concat(Number(s.lat.toFixed(6)),"°
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!0),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!0),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分秒":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!1),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!1),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ")}o.degreesToDMS(s.lng,!0)}}}function K(e,t){var i=new u.a;return e.viewer.camera.changed.addEventListener((function(n){t({position:i.cartesian3Towgs84(e.viewer.camera.position,e.viewer),orientation:{heading:e.viewer.camera.heading,pitch:e.viewer.camera.pitch,roll:e.viewer.camera.roll}})}))}function Q(e){"number"==typeof e&&(Cesium.RequestScheduler.maximumRequestsPerServer=e)}function $(e,t){e&&(e.viewer._disableKeyboardEvent=!t)}function ee(){var e=Number(Number(localStorage.getItem("IndexedDBMaxSize")).toFixed(0));return(isNaN(e)||e<1073741824)&&(e=1073741824),e}function te(e){var t=Number(Number(e).toFixed(0));(isNaN(t)||t<1073741824)&&(t=1073741824),Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.SetIndexedDBMaxSize(t),localStorage.setItem("IndexedDBMaxSize",t)}function ie(){var e=localStorage.getItem("ManageIndexexDBState");return"false"!==e&&Boolean(e)}function ne(e){"boolean"==typeof e?(Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.SetManageIndexexDBState(e),localStorage.setItem("ManageIndexexDBState",e)):console.error("参数必须为boolean")}function oe(){return Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.GetIndexedDBCurrentSize()}function se(e){Object(m.f)(e),Object(f.e)(e)}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;t||0==t||(t=1),e.viewer.scene.globe.translucency.frontFaceAlpha=t}},function(e,t,i){var n=i(22).default,o=i(25);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(36);e.exports=function(e,t,i){return(t=n(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"e",(function(){return E})),i.d(t,"d",(function(){return O})),i.d(t,"g",(function(){return T})),i.d(t,"h",(function(){return I})),i.d(t,"a",(function(){return H})),i.d(t,"b",(function(){return V})),i.d(t,"f",(function(){return W})),i.d(t,"c",(function(){return U}));var n,o,s,a=i(18),r=i.n(a),l=i(6),c=i.n(l),u=i(3),h=i.n(u),p=i(0),d=i.n(p),m=i(15),f=(i(11),i(7)),v=i(12),g=i(27),y=i(19),b=i(29);function C(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return w(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?w(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i=1;a--){for(r=!1,l=s.length-1;l>=1;l--)s[l].id&&i[l].id&&s[l].id===i[a].id&&(r=!0);r||n.viewer.scene.primitives.remove(i[a])}for(c=s.length-1;c>=1;c--){for(u=!1,h=i.length-1;h>=1;h--)s[c].id&&i[c].id&&s[c].id===i[h].id&&(u=!0,i[h].show=s[c].show,i[h].startColor=s[c].startColor,i[h].endColor=s[c].endColor,i[h].minimumSpeed=s[c].minimumSpeed,i[h].maximumSpeed=s[c].maximumSpeed,i[h].minimumParticleLife=s[c].minimumParticleLife,i[h].maximumParticleLife=s[c].maximumParticleLife,i[h].startScale=s[c].startScale,i[h].endScale=s[c].endScale,i[h].emissionRate=s[c].emissionRate,i[h].particleSize=s[c].particleSize,i[h].modelMatrix=s[c].modelMatrix);u||n.viewer.scene.primitives.add(s[c])}}case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e,t,i){var n=new Cesium.ScreenSpaceEventHandler(e.viewer.canvas);n.setInputAction((function(){s=t}),Cesium.ScreenSpaceEventType.LEFT_DOWN),n.setInputAction((function(){s=t}),Cesium.ScreenSpaceEventType.RIGHT_DOWN),n.setInputAction((function(){s=t}),Cesium.ScreenSpaceEventType.WHEEL),_.push(n)}function F(){var e,t=this.sdks[s];if(0===s?e=this.sdks[1]:1===s&&(e=this.sdks[0]),2===t.viewer.scene.mode)if(this.sdks[0].viewer.trackedEntity){var i=t.viewer.camera.positionCartographic.height;e.viewer.camera.lookAt(Cesium.Cartesian3.fromRadians(t.viewer.camera.positionCartographic.longitude,t.viewer.camera.positionCartographic.latitude,0),new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90),i))}else{this.sdks[1].viewer.trackedEntity&&(this.sdks[1].viewer.entities.remove(this.sdks[1].viewer.trackedEntity),this.sdks[1].viewer.trackedEntity=null);var n=this.tools.cartesian3Towgs84(Cesium.Cartesian3.fromRadians(t.viewer.camera.positionCartographic.longitude,t.viewer.camera.positionCartographic.latitude,t.viewer.camera.positionCartographic.height),t.viewer);e.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)})}else{var o=t.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(t.viewer.canvas.clientWidth/2,t.viewer.canvas.clientHeight/(2-(90+t.viewer.camera.pitch/(Cesium.Math.PI/180))/110)));o||(o=t.viewer.camera.positionWC);var a=this.tools.cartesian3Towgs84(t.viewer.camera.positionWC,t.viewer).alt,r=this.tools.cartesian3Towgs84(o,t.viewer);e.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(r.lng,r.lat,a)})}}function H(){return n}function V(){return o}function G(){n&&n.viewer.entities.add({show:!1,polygon:{hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray([100,50,100.0001,50,100.0001,50.0001]))}})}function W(e){s=e}function U(){return{sdkP:o,sdkD:n}}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=function(){return a()((function e(t){o()(this,e),this.sdk=t,this.viewer=t.viewer,this.handler=new Cesium.ScreenSpaceEventHandler(this.viewer.canvas)}),[{key:"mouse_left",value:function(e){var t=this;this.handler&&this.handler.setInputAction((function(i){var n=t.getcartesian(i);n&&e(i,n)}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}},{key:"mouse_left_down",value:function(e){var t=this;this.handler&&this.handler.setInputAction((function(i){var n=t.getcartesian(i);n&&e(i,n)}),Cesium.ScreenSpaceEventType.LEFT_DOWN)}},{key:"mouse_left_up",value:function(e){var t=this;this.handler&&this.handler.setInputAction((function(i){var n=t.getcartesian(i);n&&e(i,n)}),Cesium.ScreenSpaceEventType.LEFT_UP)}},{key:"mouse_move",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)}},{key:"mouse_right",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"mouse_right_down",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_DOWN)}},{key:"mouse_right_up",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_UP)}},{key:"mouse_wheel",value:function(e){this.handler&&this.handler.setInputAction((function(){e()}),Cesium.ScreenSpaceEventType.WHEEL)}},{key:"getcartesian",value:function(e){var t=e.position||e.endPosition;e.position1&&e.position2&&(t={x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2});var i=this.viewer.scene.pickPosition(t);if(!i){for(var n=this.viewer.camera.getPickRay(t),o=this.viewer.scene.drillPickFromRay(n,10),s={},a=0;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i2&&void 0!==y[2]&&y[2],o=y.length>3?y[3]:void 0,_){e.next=6;break}return e.abrupt("return");case 6:if(s=_.entityMap,r=k&&k.entityMap,!i){e.next=15;break}if((c=s.get(i))&&c.show){e.next=12;break}return e.abrupt("return");case 12:v(i,o),e.next=35;break;case 15:h=C(_.entityMap),e.prev=16,h.s();case 18:if((p=h.n()).done){e.next=27;break}if(d=a()(p.value,2),m=d[0],(f=d[1])&&f.show){e.next=24;break}return e.abrupt("continue",25);case 24:v(m,o);case 25:e.next=18;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(16),h.e(e.t0);case 32:return e.prev=32,h.f(),e.finish(32);case 35:if(!n){e.next=37;break}return e.abrupt("return");case 37:case"end":return e.stop()}}),e,null,[[16,29,32,35]])})))).apply(this,arguments)}function L(e,t){k.viewer.imageryLayers.addImageryProvider(e.imageryProvider,t)}function I(e,t,i){for(var n,o=0;o0&&void 0!==arguments[0]?arguments[0]:[];if(S=Array.isArray(e)?e:[e],_&&k){var t=_.viewer._element.getElementsByClassName("YJ-custom-checkbox-left")[0],i=_.viewer._element.getElementsByClassName("YJ-custom-checkbox-right")[0];if(e&&0!==e.length){if(t&&i){t.style.display="none",i.style.display="none";for(var n=0,o=0,s=0;s2&&void 0!==arguments[2]?arguments[2]:0,o=null;return{that:Array.prototype.slice.call(e.querySelectorAll(t),0),stopPropagation:function(e){(e=e||window.event).stopPropagation?e.stopPropagation():e.cancelBubble=!0},hide:function(){n(e,t).that.forEach((function(e){e.style.cssText+="display:none;"}))},show:function(i){void 0!==i?n(e,t).that[i].style.cssText+="display:block;":n(e,t).that.forEach((function(e){e.style.cssText+="display:block;"}))},legp_searchList:function(t){var i=[];return n(e,"input[name="+t+"]").that.forEach((function(e){i.push(e.value)})),i},legp_search:function(s){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n(e,t).that[i];if(r){var l='
\n '.concat(a?'':''),'\n
\n
\n
');r.innerHTML=l,n(e,".cy_datalist input").that[i].oninput=function(t){var a=this.value;if(n(e,".cy_datalist dl").hide(),s.length>0){n(e,".cy_datalist dl").show();var r=new RegExp(a),l=!1;n(e,".cy_datalist dl").that[i].innerHTML="",s.forEach((function(t){r.test(t.name)&&(l=!0,n(e,".cy_datalist dl").that[i].innerHTML+='
'+t.name+"
")})),l||(n(e,".cy_datalist dl").that[i].innerHTML='
暂无数据
'),c()}},n(e,".cy_datalist input").that[i].onclick=function(t){n(e,".cy_datalist dl").hide();var i=1*t.srcElement.classList[1];i=i||0,"none"===n(e,".cy_datalist dl").that[i].style.display&&(0==s.length?this.innerHTML="暂无数据":n(e,".cy_datalist dl").show(i),n(e,".cy_datalist dl").that[i].innerHTML="",s.forEach((function(t){n(e,".cy_datalist dl").that[i].innerHTML+='
'+t.name+"
"})),c()),t.stopPropagation()},document.addEventListener("click",(function(){n(e,".cy_datalist dl").hide()}))}function c(){n(e,".cy_datalist dl dd").that.forEach((function(e){e.onclick=function(e){if(this&&this.attributes){var t=this.attributes.value.value;o=t,e.currentTarget.parentNode.previousElementSibling.value=t;var i=new Event("input",{bubbles:!0});e.currentTarget.parentNode.previousElementSibling.dispatchEvent(i)}}}))}},legp_searchActive:function(e){o=e}}}},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=i(15),l=function(){return a()((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"左键开始,右键结束",i=arguments.length>1?arguments[1]:void 0;o()(this,e),this.point=void 0,this.text=t,this.div=void 0,this.mouse_type=0,this.position=new Cesium.Cartesian3,this.viewer=i.viewer,this.create_tip(this.viewer)}),[{key:"set_text",value:function(e){this.div.getElementsByTagName("p")[0].innerText=e}},{key:"get_mouse_style",value:function(e){var t="";switch(e){case 1:t="move.png";break;default:t="arrow.png"}return"url(lib/img/"+t+"),auto"}},{key:"create_tip",value:function(e){this.create_tooltip()}},{key:"setPosition",value:function(e,t,i){this.position=e,this.move_tooltip(t,i)}},{key:"destroy",value:function(){this.viewer.entities.remove(this.point),this.remove_tooltip()}},{key:"create_tooltip",value:function(){var e=new r.a;this.div=document.createElement("div");this.div.setAttribute("style","position: absolute;z-index: 777;color: #ec131a;left:10px;top:0px;pointer-events: none;");var t=document.createElement("p");t.style.margin="0px",t.style.padding="0px",t.innerText=this.text,this.div.appendChild(t);var i=document.createElement("div");i.style.width="12px",i.style.height="12px",i.style.background="url(".concat(e.getSourceRootPath()+"/img/point.png",") 100% 100% no-repeat"),i.style.backgroundSize="100% 100%",i.style.position="absolute",i.style.left="-36px",i.style.top="-4px",this.div.style.display="none",this.div.appendChild(i),e=null,document.querySelector("body").appendChild(this.div)}},{key:"style_tip",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e._element.style.cursor=this.get_mouse_style(t)}},{key:"remove_tooltip",value:function(){document.querySelector("body").contains(this.div)&&document.querySelector("body").removeChild(this.div)}},{key:"move_tooltip",value:function(e,t){var i=0,n=0;if(this.div.style.display="block",this.viewer&&this.viewer._element){var o=this.viewer._element.getElementsByClassName("cesium-widget")[0].getElementsByTagName("canvas")[0];i=o.getBoundingClientRect().top+window.scrollY,n=o.getBoundingClientRect().left+window.scrollX}this.div.style.left=e+30+n+"px",this.div.style.top=t+i+"px"}}])}()},function(e,t,i){"use strict";var n,o,s,a,r=i(22),l=i.n(r),c=i(6),u=i.n(c),h=i(3),p=i.n(h),d=i(9),m=i.n(d),f=i(1),v=i.n(f),g=i(2),y=i.n(g),b=i(0),C=i.n(b),w=i(39),k=i.n(w),_=i(24),x=(i(20),i(13)),S=function(){var e=p()(C.a.mark((function e(t,n){var o,s,a,r,l,c,u,h,p,d,m;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=new _.a,s=new R(t),a=document.getElementsByClassName("proj-convert")[0].getElementsByClassName("content")[0],r=a.getElementsByClassName("item"),l=C.a.mark((function e(n){var l,c,u,h,p,d;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=r[n].getAttribute("data-type"),c=r[n].getElementsByClassName("convert")[0],u=r[n].getElementsByClassName("pickUp")[0],h=r[n].getElementsByClassName("icon-copy-box")[0],(p=new ClipboardJS(h,{text:function(e){var t;switch(l){case 0:case"0":t=r[n].getElementsByClassName("lng")[0].value+"°,"+r[n].getElementsByClassName("lat")[0].value+"°";break;case 1:case"1":t=a.getElementsByClassName("lng-dm-d")[0].value+"°"+a.getElementsByClassName("lng-dm-m")[0].value+"',"+a.getElementsByClassName("lat-dm-d")[0].value+"°"+a.getElementsByClassName("lat-dm-m")[0].value+"'";break;case 2:case"2":t=a.getElementsByClassName("lng-dms-d")[0].value+"°"+a.getElementsByClassName("lng-dms-m")[0].value+"'"+a.getElementsByClassName("lng-dms-s")[0].value+'",'+a.getElementsByClassName("lat-dms-d")[0].value+"°"+a.getElementsByClassName("lat-dms-m")[0].value+"'"+a.getElementsByClassName("lat-dms-s")[0].value+'"'}return t}})).on("success",(function(e){s.message({text:"已复制到剪切板"})})),p.on("error",(function(e){s.message({type:"warning",text:"复制失败"})})),d=i(26).default,u.addEventListener("click",(function(){new d(t).start((function(e,t){switch(1*l){case 0:r[n].getElementsByClassName("lng")[0].value=t.lng,r[n].getElementsByClassName("lat")[0].value=t.lat;break;case 1:var i=o.degreesToDMS(t.lng,!0),s=o.degreesToDMS(t.lat,!0),c=i.split("°"),u=c[1].split("'"),h=s.split("°"),p=h[1].split("'");a.getElementsByClassName("lng-dm-d")[0].value=c[0],a.getElementsByClassName("lng-dm-m")[0].value=u[0],a.getElementsByClassName("lat-dm-d")[0].value=h[0],a.getElementsByClassName("lat-dm-m")[0].value=p[0];break;case 2:var d=o.degreesToDMS(t.lng),m=o.degreesToDMS(t.lat),f=d.split("°"),v=f[1].split("'"),g=v[1].split('"'),y=m.split("°"),b=y[1].split("'"),C=b[1].split('"');a.getElementsByClassName("lng-dms-d")[0].value=f[0],a.getElementsByClassName("lng-dms-m")[0].value=v[0],a.getElementsByClassName("lng-dms-s")[0].value=g[0],a.getElementsByClassName("lat-dms-d")[0].value=y[0],a.getElementsByClassName("lat-dms-m")[0].value=b[0],a.getElementsByClassName("lat-dms-s")[0].value=C[0]}}))})),c.addEventListener("click",(function(){var e,t,i,c,u,h,p,d,m,f,v,g,y,b,C,w,k,_,x,S;switch(l){case 0:case"0":e=r[n].getElementsByClassName("lng")[0].value,t=r[n].getElementsByClassName("lat")[0].value,p=o.degreesToDMS(e,!0),d=o.degreesToDMS(t,!0),g=(v=p.split("°"))[1].split("'"),b=(y=d.split("°"))[1].split("'"),a.getElementsByClassName("lng-dm-d")[0].value=v[0],a.getElementsByClassName("lng-dm-m")[0].value=g[0],a.getElementsByClassName("lat-dm-d")[0].value=y[0],a.getElementsByClassName("lat-dm-m")[0].value=b[0],m=o.degreesToDMS(e),f=o.degreesToDMS(t),k=(w=(C=m.split("°"))[1].split("'"))[1].split('"'),S=(x=(_=f.split("°"))[1].split("'"))[1].split('"'),a.getElementsByClassName("lng-dms-d")[0].value=C[0],a.getElementsByClassName("lng-dms-m")[0].value=w[0],a.getElementsByClassName("lng-dms-s")[0].value=k[0],a.getElementsByClassName("lat-dms-d")[0].value=_[0],a.getElementsByClassName("lat-dms-m")[0].value=x[0],a.getElementsByClassName("lat-dms-s")[0].value=S[0];break;case 1:case"1":i=r[n].getElementsByClassName("lng-dm-d")[0].value,c=r[n].getElementsByClassName("lng-dm-m")[0].value,u=r[n].getElementsByClassName("lat-dm-d")[0].value,h=r[n].getElementsByClassName("lat-dm-m")[0].value,e=o.dmsToDecimal(i+"°"+c+"'",!0),t=o.dmsToDecimal(u+"°"+h+"'",!0),a.getElementsByClassName("lng")[0].value=e,a.getElementsByClassName("lat")[0].value=t,m=o.degreesToDMS(e),f=o.degreesToDMS(t),k=(w=(C=m.split("°"))[1].split("'"))[1].split('"'),S=(x=(_=f.split("°"))[1].split("'"))[1].split('"'),a.getElementsByClassName("lng-dms-d")[0].value=C[0],a.getElementsByClassName("lng-dms-m")[0].value=w[0],a.getElementsByClassName("lng-dms-s")[0].value=k[0],a.getElementsByClassName("lat-dms-d")[0].value=_[0],a.getElementsByClassName("lat-dms-m")[0].value=x[0],a.getElementsByClassName("lat-dms-s")[0].value=S[0];break;case 2:case"2":m=(i=r[n].getElementsByClassName("lng-dms-d")[0].value)+"°"+(c=r[n].getElementsByClassName("lng-dms-m")[0].value)+"'"+r[n].getElementsByClassName("lng-dms-s")[0].value+'"',f=(u=r[n].getElementsByClassName("lat-dms-d")[0].value)+"°"+(h=r[n].getElementsByClassName("lat-dms-m")[0].value)+"'"+r[n].getElementsByClassName("lat-dms-s")[0].value+'"',e=o.dmsToDecimal(m),t=o.dmsToDecimal(f),a.getElementsByClassName("lng")[0].value=e,a.getElementsByClassName("lat")[0].value=t,p=o.degreesToDMS(e,!0),d=o.degreesToDMS(t,!0),g=(v=p.split("°"))[1].split("'"),b=(y=d.split("°"))[1].split("'"),a.getElementsByClassName("lng-dm-d")[0].value=v[0],a.getElementsByClassName("lng-dm-m")[0].value=g[0],a.getElementsByClassName("lat-dm-d")[0].value=y[0],a.getElementsByClassName("lat-dm-m")[0].value=b[0]}s.message({text:"转换成功"});for(var E=0;ENumber(e.target.max)&&(t=Number(e.target.max)),e.target.min&&t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i-1){var i=e.src.split("/");i.pop(),t=i.join("/")}})),t}},{key:"cartesian3Towgs84",value:function(e,t){var i=t.scene.globe.ellipsoid,n=new Cesium.Cartesian3(e.x,e.y,e.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude),a=Cesium.Math.toDegrees(o.longitude),r=o.height<0?0:o.height;return{lng:Number(a.toFixed(8)),lat:Number(s.toFixed(8)),alt:Number(r.toFixed(2))}}},{key:"computeDistance",value:(i=p()(C.a.mark((function e(){var t,i,n,o,s,a,r,l,c,h,p,d,m,f,v,g,y,b,w,k,_,x,S,E,P,O,D,M,T=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=T.length>0&&void 0!==T[0]?T[0]:[],i=T.length>1&&void 0!==T[1]?T[1]:2,n=T.length>2&&void 0!==T[2]?T[2]:0,!(t.length<2)){e.next=7;break}return e.abrupt("return",0);case 7:o=0,e.t0=n,e.next="0"===e.t0||0===e.t0?11:"1"===e.t0||1===e.t0?13:"2"===e.t0||2===e.t0?15:48;break;case 11:for(s=0;s20?g/20:g,y=this.chunkLine(t,m),b=[],y.forEach((function(e,t){0===t?b=u()(e.geometry.coordinates):b.push(e.geometry.coordinates[1])})),w=[],k=j(b),e.prev=25,k.s();case 27:if((_=k.n()).done){e.next=37;break}return x=_.value,S=b.indexOf(x),e.next=32,this.sampleHeight({lng:x[0],lat:x[1],alt:0},S);case 32:(E=e.sent).position.alt=E.position.alt<0?0:E.position.alt,w.push(E);case 35:e.next=27;break;case 37:e.next=42;break;case 39:e.prev=39,e.t1=e.catch(25),k.e(e.t1);case 42:return e.prev=42,k.f(),e.finish(42);case 45:for(w.length,P=0;P0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e.length<2)return 0;var n=0;if(i){var o=[];e.forEach((function(e){o.push([e.lng,e.lat,e.alt])}));var s=turf.lineString(o);n=1e3*turf.length(s)}else for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:2;if(e.length<3)return 0;var i=[];e.forEach((function(e){i.push([e.lng,e.lat])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.tesselate(n);return Number(turf.area(o).toFixed(t))}},{key:"computeSignedArea",value:function(e,t){for(var i=[],n=[],o=0;oc?l/10:c/10;var u=new Cesium.PolygonGeometry.fromPositions({positions:Cesium.Cartesian3.fromDegreesArray(i),vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:s}),h=new Cesium.PolygonGeometry.createGeometry(u);if(!h||!h.attributes||!h.attributes.position)return 0;var p=h.indices,d=h.attributes.position.values;function m(t,i){var n=new Cesium.Cartesian3(d[3*i],d[3*i+1],d[3*i+2]);return e.scene.clampToHeight(n)||n}for(var f=0,v=0;v1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{steps:360};Number(t)<=0&&(t=.01);var n=[Number(e.lng),Number(e.lat)],o=turf.circle(n,t/1e3,i).geometry.coordinates[0],s=[];return o.forEach((function(e){s=s.concat(e)})),s}},{key:"createEllipse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{granularity:.1,semiMinorAxis:10,semiMajorAxis:20,bearing:0,height:0};t.granularity||(t.granularity=.1),t.height||(t.height=0),t.semiMinorAxis||(t.semiMinorAxis=1e-5),t.semiMajorAxis||(t.semiMajorAxis=1e-5);var i=new Cesium.EllipseOutlineGeometry({center:Cesium.Cartesian3.fromDegrees(Number(e.lng),Number(e.lat)),semiMajorAxis:Number(t.semiMajorAxis),semiMinorAxis:Number(t.semiMinorAxis),height:Number(t.height),granularity:Cesium.Math.toRadians(t.granularity),rotation:Cesium.Math.toRadians(t.bearing)}),n=Cesium.EllipseOutlineGeometry.createGeometry(i);if(!n||!n.attributes||!n.attributes.position)return[];for(var o=n.attributes.position.values,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=[];e.forEach((function(e){t.push(turf.point([e.lng,e.lat]))}));var i=turf.featureCollection(t),n=turf.center(i).geometry.coordinates;return{lng:n[0],lat:n[1]}}},{key:"computeMidpoint",value:function(e,t){var i=turf.point([e.lng,e.lat]),n=turf.point([t.lng,t.lat]),o=turf.midpoint(i,n).geometry.coordinates;return{lng:o[0],lat:o[1]}}},{key:"computeAttackArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.computeArrow(e,0)}},{key:"computePincerArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.computeArrow(e)}},{key:"computeArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length<3)return[];for(var i,n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length<2)return[];e.length;var i=new Array;if(e.forEach((function(e){i.push([e.lng,e.lat])})),2===i.length){var n=P.PlotUtils.mid(i[0],i[1]),o=P.PlotUtils.distance(i[0],n)/.9,s=P.PlotUtils.getThirdPoint(i[0],n,P.Constants.HALF_PI,o,!0);i=[i[0],s,i[1]]}var a=P.PlotUtils.mid(i[0],i[2]);i.push(a,i[0],i[1]);for(var r=[],l=void 0,c=void 0,h=void 0,p=[],d=0;d0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length<2)return[];var i=[e[0].lng,e[0].lat],n=[e[1].lng,e[1].lat];if(e[0].lng===e[1].lng&&e[0].lat===e[1].lat){if(t)return[e[0],e[0],e[0]];var o=Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat);return[o,o,o]}for(var s,a=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:"#2ab0c2",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="",s={7:10,8:3,9:4,10:4,11:4,12:2};switch(i&&(s[t+""]?i.polyline.width=i.polyline.oriWidth+s[t+""]:i.polyline.width=i.polyline.oriWidth),Number(t)){case 1:o=new Cesium.PolylineDashMaterialProperty({color:Cesium.Color.fromCssColorString(e),dashLength:10});break;case 2:o=new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:Cesium.Color.fromCssColorString(e)});break;case 3:o=new Cesium.PolylineFlowMaterialProperty({color:e,speed:n.rotate?n.speed:0-n.speed,rotate:n.rotate});break;case 4:o=new Cesium.PolylineFlowMultMaterialProperty({color:e,speed:n.rotate?n.speed:0-n.speed,rotate:n.rotate});break;case 5:case 6:var a,r=this;o=new Cesium.FlowDashedLineFlowMaterialProperty({color:e,uType:5==t?0:1,speed:n.rotate?n.speed:0-n.speed,space:n.space,scale:new Cesium.CallbackProperty((function(){if(r.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE3D){var e=i.polyline.positions.getValue();if(!Cesium.defined(e))return 1;for(var t=0,n=0;n0||0==t.speed?(n.width=s.width*(t.space+1),n.height=s.height,o.drawImage(s,s.width*(t.space/2),0)):(o.clearRect(0,0,n.width,n.height),n.width=s.width*(t.space+1),n.height=s.height,o.save(),o.translate(n.width/2,n.height/2),o.rotate(Math.PI),o.translate(-n.width/2,-n.height/2),o.drawImage(s,s.width*(t.space/2),0),o.restore());var a=0,r=0;i.polyline.material=new Cesium.LineTextureMaterialProperty({color:t.color,image:n,speed:t.speed,repeat:new Cesium.CallbackProperty((function(){if(e.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE3D){var o=i.polyline.positions.getValue(e.sdk.viewer.clock.currentTime);if(!Cesium.defined(o))return new Cesium.Cartesian2(1,1);for(var s=0,l=0;l700){var v=(u*=f/h/(t.space*(n.width/n.height*5)+1))/i.polyline.oriRepeat;i.polyline.oriSpeed=v,i.polyline.oriRepeatX=u,a=v,r=u,c=new Cesium.Cartesian2(u,v||1)}else c=new Cesium.Cartesian2(r||i.polyline.oriRepeatX,a||i.polyline.oriSpeed);return c}var g=Object(B.b)(),y=g.viewer.entities.getById(e.options.id),b=y.polyline.positions.getValue(g.viewer.clock.currentTime);if(!Cesium.defined(b))return new Cesium.Cartesian2(1,1);for(var C=0,w=0;w700){var D=(_*=O/x/(t.space*(n.width/n.height*5)+1))/y.polyline.oriRepeat;y.polyline.oriSpeed=D,y.polyline.oriRepeatX=_,a=D,r=_,k=new Cesium.Cartesian2(_,D||1)}else k=new Cesium.Cartesian2(r||y.polyline.oriRepeatX,a||y.polyline.oriSpeed);return k}))});var l=e.getSceenLine(i,t,n);l&&(i.polyline.oriRepeat=l)}}},{key:"getSceenLine",value:function(e,t,i){var n=new Cesium.Cartesian2(0,this.sdk.viewer.canvas.clientHeight),o=new Cesium.Cartesian2(this.sdk.viewer.canvas.clientWidth/2,this.sdk.viewer.canvas.clientHeight),s=this.sdk.viewer.camera.getPickRay(n),a=this.sdk.viewer.scene.globe.pick(s,this.sdk.viewer.scene),r=this.sdk.viewer.camera.getPickRay(o),l=this.sdk.viewer.scene.globe.pick(r,this.sdk.viewer.scene);if(a&&l){var c=Cesium.Cartesian3.distance(a,l)/e.polyline.width.getValue(),u=this.sdk.viewer.camera.positionCartographic.height,h=new Cesium.BoundingSphere(new Cesium.Cartesian3(-1e6,0,0),5e5),p=this.sdk.viewer.canvas.clientWidth,d=this.sdk.viewer.canvas.clientHeight,m=this.sdk.viewer.scene.camera.getPixelSize(h,p,d);return m>700?c*=m/u/(t.space*(i.width/i.height*5)+1):c=void 0,this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE3D?c:Object(B.b)().viewer.entities.getById(this.options.id).polyline.oriRepeatX}}},{key:"create_arrow1_picture",value:function(e){var t=new fabric.Canvas("canvas");t.width=150,t.height=75;var i=e,n=new fabric.Polygon([{x:t.width,y:t.height/2},{x:t.width-35,y:t.height},{x:t.width-35,y:t.height-20},{x:t.width/2,y:t.height-20},{x:t.width/2,y:20},{x:t.width-35,y:20},{x:t.width-35,y:0}],{fill:i});return t.add(n),t.toDataURL()}},{key:"create_arrow2_picture",value:function(e){var t=new fabric.Canvas("canvas");t.width=75,t.height=75;var i=e,n=new fabric.Polygon([{x:t.width,y:t.height/2},{x:t.width-35,y:t.height},{x:t.width-35-40,y:t.height},{x:t.width-40,y:t.height/2},{x:t.width-35-40,y:0},{x:t.width-35,y:0}],{fill:i});return t.add(n),t.toDataURL()}},{key:"sampleHeightMostDetailed",value:function(e,t){var i=[];return e.forEach((function(e){i.push(new Cesium.Cartographic.fromDegrees(e.lng,e.lat))})),t?t.viewer.scene.sampleHeightMostDetailed(i):this.sdk.viewer.scene.sampleHeightMostDetailed(i)}},{key:"flyHome",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(Object(N.w)(0),Object(N.f)(this.sdk),Object(N.g)(this.sdk),this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE){var t=this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE.destination,i=this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE.orientation;this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),orientation:{heading:Cesium.Math.toRadians(i.heading||0),pitch:Cesium.Math.toRadians(i.pitch||0),roll:Cesium.Math.toRadians(i.roll||0)},duration:e})}else this.sdk.viewer.camera.flyHome(e)}},{key:"setPickStatus",value:function(){}},{key:"create_point_buffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{steps:10},n=turf.point([Number(e.lng),Number(e.lat)]),o=turf.buffer(n,Number(t)/1e3,i);return o.geometry.coordinates}},{key:"create_line_buffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(1===e.length)return this.create_point_buffer(e[0],t);if(0===e.length)return!1;var i=[];e.forEach((function(e){i.push([Number(e.lng),Number(e.lat)])}));var n=turf.lineString(i),o=turf.buffer(n,Number(t)/1e3);return o.geometry.coordinates}},{key:"create_area_buffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(1===e.length)return this.create_point_buffer(e[0],t);if(0===e.length)return!1;if(2===e.length)return this.create_line_buffer(e,t);var i=[];e.forEach((function(e){i.push([Number(e.lng),Number(e.lat)])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.buffer(n,Number(t)/1e3);return o.geometry.coordinates}},{key:"cal_envelope",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!(e.length<2)){var t=[];e.forEach((function(e){t.push(turf.point([e.lng,e.lat]))}));var i=turf.featureCollection(t);return turf.envelope(i).geometry.coordinates[0]}console.error("坐标数量不能少于2个")}},{key:"chunkLine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(e.length<2)return[];var i=[];e.forEach((function(e){i.push([e.lng,e.lat])}));var n=turf.lineString(i),o=turf.lineChunk(n,t/1e3),s=new Map;return o.features.forEach((function(e){e.geometry.coordinates.forEach((function(e){var t=e.join(","),i={lng:e[0],lat:e[1]};s.set(t,i)}))})),o.features}},{key:"billboardAnimation",value:function(e,t){var i=t.id,n=t.offset,o=void 0===n?10:n,s=(t.times,e.entities.getById(i));if(s){var a=Math.PI,r=a/60,l=0,c=this.cartesian3Towgs84(s.position.getValue(),e),u=setInterval((function(){l+=r;var e=o*Math.sin(l)+c.alt;l>a&&(l=0),s.position=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,e)}),30);setTimeout((function(){clearInterval(u),s.position=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt)}),3e3)}}},{key:"calSector",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:25,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:45,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:360,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=turf.point([e.lng,e.lat]),r=turf.sector(a,t/1e3,i,n,{steps:o}).geometry.coordinates,l=[];return r.forEach((function(e){e.forEach((function(e){var t;t=s?{lng:e[0],lat:e[1]}:Cesium.Cartesian3.fromDegrees(e[0],e[1]),l.push(t)}))})),l}},{key:"getClampToHeight",value:(e=p()(C.a.mark((function e(t){var i,n,o,s,a,r,l=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>1&&void 0!==l[1]?l[1]:[],this.sdk&&this.sdk.viewer){e.next=3;break}return e.abrupt("return",0);case 3:return n=new Cesium.Cartesian3.fromDegrees(t.lng,t.lat),e.prev=4,e.next=7,this.sdk.viewer.scene.clampToHeight(n,i);case 7:if(e.t0=e.sent,e.t0){e.next=10;break}e.t0=n;case 10:o=e.t0,e.next=16;break;case 13:e.prev=13,e.t1=e.catch(4),o=n;case 16:return e.next=18,this.cartesian3Towgs84(o,this.sdk.viewer).alt;case 18:if(s=e.sent,a=0,e.prev=20,!this.sdk.viewer.scene.terrainProvider.availability){e.next=26;break}return e.next=24,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(t.lng,t.lat)]);case 24:(r=e.sent)[0].height&&(a=r[0].height);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(20),a=0;case 31:if(!(s>a)){e.next=35;break}return e.abrupt("return",Number(s.toFixed(2)));case 35:return e.abrupt("return",Number(a.toFixed(2)));case 36:case"end":return e.stop()}}),e,this,[[4,13],[20,28]])}))),function(t){return e.apply(this,arguments)})},{key:"deepCopyObj",value:function(e){var t=null;if(Array.isArray(e)){t=[];for(var i=0;i0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e?S(this.sdk,t):E()}},{key:"projectionConvert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e?M(this.sdk,t):T()}},{key:"exportExcel",value:function(e){var t="";for(var i in e[0])t+=''.concat(i,"");t+="";for(var n,o='{rows}
',s=function(e,t){return e.replace(/{(\w+)}/g,(function(e,i){return t[i]}))},a="",r="",l=0;l",e[l])r+=s('{data}',{nameType:"String",data:e[l][c]});r+="",l>0&&l/6e4%1==0&&(a+=s(o,{rows:r,nameWS:"Sheet"+l}),r="",r+=t)}a+=s(o,{rows:r,nameWS:"Sheet"}),r="",n=s('Axel Richter{created}{worksheets}',{created:(new Date).getTime(),worksheets:a});var u,h=document.createElement("A");h.href="data:application/vnd.ms-excel;base64,"+(u=n,window.btoa(unescape(encodeURIComponent(u)))),h.download="矢量数据导出.xls",h.target="_blank",document.body.appendChild(h),h.click(),document.body.removeChild(h)}},{key:"decompressGzip",value:function(e){var t=pako.inflate(e);return(new TextDecoder).decode(t)}},{key:"cmykToRgb",value:function(e){var t=e.c,i=e.m,n=e.y,o=e.k,s={r:0,g:0,b:0};return s.c=t/100,s.m=i/100,s.y=n/100,s.k=o/100,s.r=1-Math.min(1,s.c*(1-s.k)+s.k),s.g=1-Math.min(1,s.m*(1-s.k)+s.k),s.b=1-Math.min(1,s.y*(1-s.k)+s.k),s.r=Math.round(255*s.r),s.g=Math.round(255*s.g),s.b=Math.round(255*s.b),"rgb(".concat(s.r,", ").concat(s.g,", ").concat(s.b,")")}},{key:"convertPxToRem",value:function(e,t){var i=parseFloat(getComputedStyle(document.documentElement).fontSize),n=[],o=[];if(t){n=document.getElementById(e.div_id).querySelectorAll(t);for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:[],t=e.length,i=0,n=0,o=0;o0&&i<0||n<0&&i>0)return!1;i=n}}return!0}},{key:"getDateTimeString",value:function(){var e=new Date,t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0"),r=String(e.getMilliseconds()).padStart(3,"0");return"".concat(t).concat(i).concat(n).concat(o).concat(s).concat(a).concat(r)}},{key:"replaceHost",value:function(e,t){var i=e;if(!e||!t)return e;try{if(e.startsWith("http")){var n=/^[^@]+@/;n.test(e)&&(e=e.replace(n,"")),/^[a-z]+:\/\//i.test(e)||(e="http://"+e);var o=new URL(e),s=new URL(t),a=o.hostname,r=o.port;return a.startsWith("[")&&a.endsWith("]")&&(a=a.slice(1,-1)),"localhost"!==a&&"127.0.0.1"!==a||55110===parseInt(r,10)||(o.port=s.port,o.protocol=s.protocol,i=o.toString()),i}return e.includes(":")||this.options.host&&(i=new URL(e,this.options.host).href),i}catch(e){return i}}},{key:"message",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type||"success",i=e.text||"",n=(e.duration,document.getElementById("YJ-custom-message"));n&&document.body.removeChild(n),n=document.createElement("div"),n.id="YJ-custom-message","success"==t?n.innerHTML='\n '.concat(i,"\n "):"warning"==t&&(n.innerHTML='\n '.concat(i,"\n ")),document.body.appendChild(n),n.classList.add(t)}},{key:"pointDistance",value:function(e,t){var i=Cesium.Cartesian3.fromDegrees(e.lng,e.lat),n=Cesium.Cartesian3.fromDegrees(t.lng,t.lat);return Cesium.Cartesian3.distance(n,i)}},{key:"mercatorToWGS84",value:function(e,t){var i=t/20037508.34*180;return[e/20037508.34*180,i=180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2)]}},{key:"convertCGCStoWGS84",value:function(e,t,i){return proj4("+proj=tmerc +lat_0=0 +lon_0="+i+" +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[e,t])}},{key:"convertCGCSToWGS84WithZone",value:function(e,t){var i=e.toString(),n=parseInt(i.substring(0,2)),o=parseInt(i.substring(2)),s="+proj=tmerc +lat_0=0 +lon_0=".concat(3*n," +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");return proj4(s,"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[o,t])}},{key:"convertCGCS2000_6ToWGS84",value:function(e,t,i){return proj4("+proj=tmerc +lat_0=0 +lon_0="+i+" +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[e,t])}},{key:"convertCGCS2000_6ToWGS84WithZone",value:function(e,t){var i=e.toString(),n=6*parseInt(i.substring(0,2))-3,o=parseInt(i.substring(2));return proj4("+proj=tmerc +lat_0=0 +lon_0="+n+" +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[o,t])}}],[{key:"_md5",value:function(e){return k()(e).toUpperCase()}}]);var e,t,i}(),R=t.a=I},function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return f})),i.d(t,"a",(function(){return d}));var n=i(3),o=i.n(n),s=i(0),a=i.n(s);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isc:!1,excel:!1,flv:!1,rtsp:!1,hls:!1,host:"",username:"",password:"",token:""};return new Promise((function(t,i){var n=v(),o=["/custom/css/index.css","/arrow/algorithm.js","/arrow/plotUtil.js","/3rdparty/turf.min.js","/3rdparty/fabric.min.js","/3rdparty/proj4.js","/3rdparty/pako.min.js","/3rdparty/heatmap.js","/3rdparty/tween.umd.js","/Cesium/Cesium.js","/Cesium/Widgets/widgets.css","/3rdparty/ewPlugins.min.js","/3rdparty/wangeditor/index.js","/3rdparty/wangeditor/style.css","/3rdparty/html2canvas.min.js","/3rdparty/kriging.js","/3rdparty/echarts.min.js","/3rdparty/clipboard.min.js","/3rdparty/libgif.js","/3rdparty/liveplayer/liveplayer-element.min.js","/3rdparty/jedate/jedate.min.js","/3rdparty/jedate/skin/jedate.css"];window.YJSDK3rdpartyResourceAddress=n+"/3rdparty",e.ws&&o.push("/3rdparty/reconnecting-websocket.js"),(e.flv||e.rtsp)&&o.push("/3rdparty/flv.min.js");var s=document.createElement("script");s.setAttribute("type","module"),s.textContent="\n import * as THREE from '".concat(n,"/3rdparty/three/three.module.min.js';\n window.THREE = THREE\n "),document.querySelector("html").appendChild(s);var a=document.createElement("script");a.setAttribute("type","module"),a.textContent="\n import { SVGLoader } from '".concat(n,"/3rdparty/three/jsm/loaders/SVGLoader.js';\n window.SVGLoader = SVGLoader\n "),document.querySelector("html").appendChild(a);var r=[];o.forEach((function(e){var t;e.endsWith(".js")?((t=document.createElement("script")).setAttribute("type","text/javascript"),t.setAttribute("src",n+e)):((t=document.createElement("link")).setAttribute("rel","stylesheet"),t.setAttribute("href",n+e)),document.querySelector("html").appendChild(t);var i=new Promise((function(e,i){t.onload=function(){e()}})).then((function(e){return e}));r.push(i)})),Promise.all(r).then((function(i){var o,s;(o=document.createElement("script")).setAttribute("type","text/javascript"),o.setAttribute("src",n+"/3rdparty/viewerCesiumNavigationMixin.min.js"),document.querySelector("html").appendChild(o),o.onload=function(){p(e.host),e.username?u(e).then((function(e){t()})):(m(e.token),t())},(s=document.createElement("script")).setAttribute("type","text/javascript"),s.setAttribute("src",n+"/3rdparty/CesiumHeatmap.js"),document.querySelector("html").appendChild(s)})).catch((function(e){i(e)}))}))}var l="9e549c39c542fc9f835c2a5c260f8cc1",c="40ef4712c26360d01e397ebcb0d031ca";function u(){return h.apply(this,arguments)}function h(){return(h=o()(a.a.mark((function e(){var t,i,n,o=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,fetch((t.host||"")+"/yjearth4.0/api/v1/user/sign-in",{method:"post",body:JSON.stringify({username:t.username,password:t.password}),headers:{"Content-Type":"application/json"}});case 3:return i=e.sent,e.next=6,i.text();case 6:n=e.sent,0===(n=JSON.parse(n)).code&&(p(t.host),n.token?m(n.token):m(n.data.token));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){localStorage.setItem(c,e||"")}function d(){return localStorage.getItem(c)||""}function m(e){localStorage.setItem(l,e)}function f(){return localStorage.getItem(l)}function v(){var e=document.querySelectorAll("script"),t="";return e.forEach((function(e){if(e.src.indexOf("YJEarth.min.js")>-1){var i=e.src.split("/");i.pop(),t=i.join("/")}})),t}},function(e,t,i){var n=i(38);function o(){return e.exports=o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var o=n(e,t);if(o){var s=Object.getOwnPropertyDescriptor(o,t);return s.get?s.get.call(arguments.length<3?e:i):s.value}},e.exports.__esModule=!0,e.exports.default=e.exports,o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(43),o=i(44),s=i(34),a=i(45);e.exports=function(e,t){return n(e)||o(e,t)||s(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"g",(function(){return h})),i.d(t,"a",(function(){return p})),i.d(t,"j",(function(){return g})),i.d(t,"m",(function(){return y})),i.d(t,"i",(function(){return d})),i.d(t,"c",(function(){return m})),i.d(t,"l",(function(){return b})),i.d(t,"n",(function(){return C})),i.d(t,"h",(function(){return f})),i.d(t,"b",(function(){return v})),i.d(t,"k",(function(){return w})),i.d(t,"o",(function(){return k})),i.d(t,"d",(function(){return _})),i.d(t,"f",(function(){return x})),i.d(t,"e",(function(){return S}));var n=null,o=null,s=null,a=new Map,r=new Map,l=new Map;function c(e,t){var i=t.scene.globe.ellipsoid,n=new Cesium.Cartesian3(e.x,e.y,e.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude);return{lng:Cesium.Math.toDegrees(o.longitude),lat:s,alt:o.height<0?0:o.height}}function u(e,t){t.endPosition&&(t.endPosition.y-=2);var i=t.position||t.endPosition,n=e.viewer.scene.pickPosition(i);if(!n){var o=e.viewer.camera.getPickRay(i);n=e.viewer.scene.globe.pick(o,e.viewer.scene)}return n}function h(e,t){if(e&&e.viewer){var i=!0;(n=new Cesium.ScreenSpaceEventHandler(e.viewer.canvas)).setInputAction((function(n){var o=e.viewer.scene.pickPosition(n.position);if(!o){var s=e.viewer.camera.getPickRay(n.position);o=e.viewer.scene.globe.pick(s,e.viewer.scene)}if(o){var r=c(o,e.viewer);if(t&&t(r),i&&(i=!1,setTimeout((function(){i=!0}),600),!YJ.Measure.GetMeasureStatus()&&o)){for(var l=!1,h=a.size-1;h>=0;h--){var p=Array.from(a.keys())[h],d=a.get(p);if(d&&d.that)if("PolygonObject"===d.that.type){if(d.that.picking&&d.that.options.positions&&d.that.options.positions.length>=3){for(var m=turf.point([r.lng,r.lat]),f=[],v=0;v=3){for(var y=d.that.computeAssemble(d.that.options.positions,!0),b=turf.point([r.lng,r.lat]),C=[],w=0;w=3){for(var _=turf.point([r.lng,r.lat]),x=d.that.computeAttackArrow(d.that.options.positions),S=[],E=0;E=5){for(var D=turf.point([r.lng,r.lat]),M=d.that.computePincerArrow(d.that.options.positions),T=[],N=0;N1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];l()(this,e),this.container=t,this.options=m({},i),this.options.ismove=!0,!1===i.ismove&&(this.options.ismove=i.ismove),this.closeCallBack=i.closeCallBack,this._element={},this._element_style=void 0,this.only=n}),[{key:"init",value:(e=o()(p.a.mark((function e(){var t,i,n,o=this;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.only&&this.closeAll(),v.push(this),this.isDestroy=!1,this._element.body=document.createElement("div"),this._element.body.className="YJ-custom-base-dialog",this._element.body.style.top=this.options.top,this._element.body.style.bottom=this.options.bottom,this._element.body.style.left=this.options.left,this._element.body.style.right=this.options.right,this.container.appendChild(this._element.body),this._element.title=document.createElement("div"),this._element.title.className="title-box",this._element.title.innerHTML=''.concat(this.options.title||"","")+'',this._element.body.appendChild(this._element.title),e.next=16,document.createElement("div");case 16:return this._element.content=e.sent,this._element.content.className="content",this._element.body.appendChild(this._element.content),e.next=21,document.createElement("div");case 21:return this._element.foot=e.sent,this._element.foot.className="foot",this._element.foot.innerHTML='\n \n ',this._element.body.appendChild(this._element.foot),e.next=27,document.createElement("div");case 27:for((t=e.sent).style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.backdropFilter="blur(2px)",t.style.zIndex="-999999",this._element.body.appendChild(t),this._element.body.getElementsByClassName("close-box")[0].addEventListener("click",(function(){o.close()})),i=this._element.body.getElementsByClassName("close"),n=0;n=0;t--)e[t].dataset&&"YJ_style_dialog"===e[t].dataset.name&&document.getElementsByTagName("head")[0].removeChild(e[t]);this._element.body&&this._element.body.parentNode&&this.container.removeChild(this._element.body),this._element.body=null,this._element.title=null,this._element.content=null,this._element.foot=null,this._element_style=null,this.isDestroy=!0,this.closeCallBack&&(this.closeCallBack(),this.closeCallBack=null)}},{key:"closeAll",value:function(){for(var e=v.length-1;e>=0;e--)v[e].close(),v.splice(e,1)}},{key:"titleAppChild",value:function(e){this._element.title.appendChild(e)}},{key:"contentAppChild",value:function(e){this._element.content.appendChild(e)}},{key:"footAppChild",value:function(e,t){t?this._element.foot.insertBefore(e,t):this._element.foot.prepend(e)}},{key:"moveDiv",value:function(){var e=this,t=0,i=0,n=0,o=0,s=this._element.body,a=this;s.onmousedown=function(s){if("title-box"===s.toElement.className){var r=e._element.body.offsetHeight,l=e._element.body.offsetWidth;t=s.clientX,i=s.clientY;var c=window.getComputedStyle(e._element.body).left,u=window.getComputedStyle(e._element.body).top;n=1*c.substr(0,c.indexOf("px")),o=1*u.substr(0,u.indexOf("px"));var h=document.documentElement.clientHeight,p=document.documentElement.clientWidth;window.onmousemove=function(e){e.preventDefault();var s=e.clientX,c=e.clientY,u=s-(t-n),d=c-(i-o);u<0?u=0:u+l>p&&(u=p-l),d<=0?d=0:d+r>h&&(d=h-r),a._element.body.style.left=u+"px",a._element.body.style.top=d+"px",a._element.body.style.bottom="unset",a._element.body.style.right="unset"},document.onmouseup=function(e){window.onmousemove=null},window.ondragend=function(e){window.onmousemove=null}}},document.onmouseup=function(e){window.onmousemove=null},window.ondragend=function(e){window.onmousemove=null}}}]);var e}(),v=[];t.a=f},function(e,t,i){"use strict";var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=i(8),l=i.n(r),c=i(5),u=i.n(c),h=i(4),p=i.n(h),d=i(15),m=i(10);function f(e,t,i){return t=u()(t),l()(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,i||[],u()(e).constructor):t.apply(e,i))}var v=function(e){function t(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return o()(this,t),(i=f(this,t,[e,n])).viewer=e.viewer,i.entityHasCreated=!1,i.event=null,i.tip=null,i.points_ids=[],i.color=n.color||"rgba(185,14,14,0.58)",i._is2D=s,i._sdk2D=Object(m.a)(),i}return p()(t,e),a()(t,[{key:"create_point",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.viewer,i=this.randomString();return t.entities.add(new Cesium.Entity({id:i,position:e,billboard:{image:this.getSourceRootPath()+"/img/point.png",color:Cesium.Color.WHITE.withAlpha(.99)}})),i}},{key:"remove_entity",value:function(e){this.viewer.entities.removeById(e),!this._is2D&&this._sdk2D&&this._sdk2D.viewer&&this._sdk2D.viewer.entities&&this._sdk2D.viewer.entities.removeById(e)}},{key:"start",value:function(){}},{key:"end",value:function(){var e=this;YJ.Measure.SetMeasureStatus(!1),this.entityHasCreated=!1,this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy(),this.tip&&this.tip.destroy(),this.points_ids.forEach((function(t){e.remove_entity(t)}))}}])}(d.a);t.a=v},function(e,t){function i(t){return e.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return r})),i.d(t,"d",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"e",(function(){return c}));var n=i(15),o=i(7);function s(e){var t=new n.a,i=new Cesium.CustomDataSource("sdk-dataSource1");e.dataSources.add(i).then((function(e){var i;e.clustering.enabled=!1,e.clustering.pixelRange=15,e.clustering.minimumClusterSize=2;for(var n=new Cesium.PinBuilder,s=(n.fromText("50+",Cesium.Color.RED,48).toDataURL(),n.fromText("40+",Cesium.Color.ORANGE,48).toDataURL(),n.fromText("30+",Cesium.Color.YELLOW,48).toDataURL(),n.fromText("20+",Cesium.Color.GREEN,48).toDataURL(),n.fromText("10+",Cesium.Color.BLUE,48).toDataURL(),new Array(8)),a=0;a=1e3?(i.billboard.scale=1.5,i.label.pixelOffset=new Cesium.Cartesian2(-28,-46)):e.length>=100?(i.billboard.scale=1.25,i.label.pixelOffset=new Cesium.Cartesian2(-21,-40)):e.length>=50?(i.billboard.scale=1.1,i.label.pixelOffset=new Cesium.Cartesian2(-16,-36)):e.length>=40?(i.billboard.scale=1.05,i.label.pixelOffset=new Cesium.Cartesian2(-16,-34)):e.length>=30?(i.billboard.scale=1,i.label.pixelOffset=new Cesium.Cartesian2(-16,-32)):e.length>=20?(i.billboard.scale=.95,i.label.pixelOffset=new Cesium.Cartesian2(-16,-30)):e.length>=10?(i.billboard.scale=.9,i.label.pixelOffset=new Cesium.Cartesian2(-16,-28)):(i.billboard.scale=.8,i.label.pixelOffset=new Cesium.Cartesian2(-11,-25))}));var n=e.clustering.pixelRange;e.clustering.pixelRange=0,e.clustering.pixelRange=n}();var r={pixelRange:15,minimumClusterSize:2};function l(t){Cesium.knockout.getObservable(r,t).subscribe((function(i){e.clustering[t]=i}))}Cesium.knockout.track(r),l("pixelRange"),l("minimumClusterSize")}))}function a(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.viewer,n=0;n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n={points:[],code:0,message:""};if(!this.name_map.has(t)&&!this.epsg_map.has(t))return n.code=1,n.message="不支持的坐标系:"+t,n;if(!this.name_map.has(i)&&!this.epsg_map.has(i))return n.code=1,n.message="不支持的坐标系:"+i,n;var o=(this.name_map.get(t)||this.epsg_map.get(t)).epsg,s=(this.name_map.get(i)||this.epsg_map.get(i)).epsg,a=proj4.defs(o),r=proj4.defs(s);return e.forEach((function(e){var t=Number(e.x),i=Number(e.y),o=Number(e.z||0),s=proj4(a,r,[t,i]);n.points.push({x:Number(s[0].toFixed(10)),y:Number(s[1].toFixed(10)),z:o})})),n}},{key:"getAllProjection",value:function(){return Array.from(this.name_map.values())}},{key:"projectionIsExists",value:function(e){return this.name_map.has(e)||this.epsg_map.has(e)}},{key:"degreesToDMS",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function i(e){var t=e.toString(),i=t.indexOf(".");return-1!==i?t.length-i-1:0}function n(e){return Math.pow(10,e)}var o=!1;e<0&&(o=!0),e=Math.abs(e);var s=Math.floor(e),a=n(i(e)),r=Math.floor((e-s)*a*60)/a,l=Math.floor(r);o&&(s=-s);var c=n(i(r)),u=Math.floor((r-l)*c)/c*60;return t?s+"°"+Math.floor(1e4*r)/1e4+"'":s+"°"+l+"'"+Math.floor(100*u)/100+'"'}},{key:"dmsToDecimal",value:function(e,t){var i,n,o;if(t){var s=e.split("°"),a=s[1].split("'");i=s[0],n=a[0],console.log(i,n);var r=Math.pow(10,8),l=Number(i*r)+n*r/60;return Math.round(l)/r}var c=e.split("°"),u=c[1].split("'"),h=u[1].split('"');i=c[0],n=u[0],o=h[0],console.log(i,n,o);var p=Math.pow(10,8),d=Number(i*p)+n*p/60+o*p/3600;return Math.round(d)/p}}])}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.r(t);var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=i(8),l=i.n(r),c=i(5),u=i.n(c),h=i(4),p=i.n(h),d=i(14),m=i(11);function f(e,t,i){return t=u()(t),l()(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,i||[],u()(e).constructor):t.apply(e,i))}var v=function(e){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return o()(this,t),f(this,t,[e,i,n])}return p()(t,e),a()(t,[{key:"start",value:function(e){var t=this;if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i=void 0;YJ.Measure.SetMeasureStatus(!0),this.tip=new d.a("左键确定,右键结束;",this.sdk),this.event=new m.a(this.sdk),this.event.mouse_left((function(n,o){t.end();var s=t.cartesian3Towgs84(i||o,t.viewer);e(null,s,Cesium)})),this.event.mouse_right((function(i,n){t.end(),e(!1)})),this.event.mouse_move((function(e,n){i=n,t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),this.event.gesture_pinck_start((function(n,o){var s=new Date;t.event.gesture_pinck_end((function(){if(new Date-s>=500)t.end(),e(!1);else{t.end();var n=t.cartesian3Towgs84(i||o,t.viewer);e(null,n)}}))})),!this._is2D&&this._sdk2D&&(this.event2D=new m.a(this._sdk2D),this.event2D.mouse_left((function(n,o){t.end();var s=t.cartesian3Towgs84(i||o,t.viewer);e(null,s,Cesium)})),this.event2D.mouse_right((function(i,n){t.end(),e(!1)})),this.event2D.mouse_move((function(e,n){i=n,t.tip.setPosition(n,e.endPosition.x+t.viewer.canvas.width,e.endPosition.y)})),this.event2D.gesture_pinck_start((function(n,o){var s=new Date;t.event2D.gesture_pinck_end((function(){if(new Date-s>=500)t.end(),e(!1);else{t.end();var n=t.cartesian3Towgs84(i||o,t.viewer);e(null,n)}}))})))}}},{key:"end",value:function(){YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy(),this.tip&&this.tip.destroy()}}])}(i(21).a);t.default=v},function(e,t,i){"use strict";i.d(t,"a",(function(){return m})),i.d(t,"b",(function(){return f})),i.d(t,"c",(function(){return v}));var n,o=i(3),s=i.n(o),a=i(0),r=i.n(a),l=i(10),c=i(12),u=i(7),h=i(15),p=!1,d="1:100万";function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){n||(n=new h.a),(p=!!t)?f(e,d):y(e);var i=Object(l.a)();i&&(p?f(e,d):y(i));var o=Object(c.a)().sdkD;o&&e!==o&&m(o,t)}}function f(e,t){d=t,p&&g(e);var i=Object(l.a)();return i&&p&&g(i),new Promise(function(){var e=s()(r.a.mark((function e(t,i){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){t()}),1e3);case 1:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}())}function v(){return p}function g(e){y(e);var t,i,n=e.viewer.camera.positionCartographic,o={position:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height}},s=e.viewer;switch(d){case"1:100万":o.position.alt=16e6;break;case"1:50万":o.position.alt=5e6;break;case"1:25万":o.position.alt=23e5;break;case"1:10万":o.position.alt=68e4;break;case"1:5万":o.position.alt=385e3;break;case"1:2.5万":o.position.alt=18e4;break;case"1:1万":o.position.alt=9e4;break;case"1:5000":o.position.alt=46e3}for(var a=0;au&&(u+=360),c={minLng:r,minLat:l,maxLng:u,maxLat:h},l<-88&&(l=-88),h>88&&(h=88),(c.maxLng-c.minLng)/n*((c.maxLat-c.minLat)/o)>7e3)c=null;else{for(var d=r;d<=u;d+=n){for(var f=[],v=[],g=l;Math.floor(1e9*g)/1e9<=h;g+=o/2)v.push([d,g]),f.push(Cesium.Cartesian3.fromDegrees(d,g,8848));88!=h&&h+o/2>=88&&f.push(Cesium.Cartesian3.fromDegrees(d,88,8848));var y=new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:f,width:1,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,arcType:Cesium.ArcType.RHUMB})});if(t.add(new Cesium.Primitive({geometryInstances:y,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromCssColorString("#fcfc00")})})})),dh)break;var w=p(C.lng,C.lat,e);i.add({position:Cesium.Cartesian3.fromDegrees(C.lng,C.lat,8848),text:w,font:"16px Inter, sans-serif",fillColor:Cesium.Color.fromCssColorString("#fcfc00"),pixelOffset:new Cesium.Cartesian2(0,0),showBackground:!1,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,scale:1,distanceDisplayCondition:new Cesium.DistanceDisplayCondition(0,8e7),scaleByDistance:s})}}for(var k=l;Math.floor(1e9*k)/1e9<=h;k+=o){for(var _=[],x=[],S=r;S<=u;S+=n/2)x.push([S,k]),_.push(Cesium.Cartesian3.fromDegrees(S,k,8848));var E=new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:_,width:1,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,arcType:Cesium.ArcType.RHUMB})});t.add(new Cesium.Primitive({geometryInstances:E,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromCssColorString("#fcfc00")})})}))}}}function p(e,t,i){var n,o;switch(i){case"1:100万":n=6,o=4;break;case"1:50万":n=3,o=2;break;case"1:25万":n=1.5,o=1;break;case"1:10万":n=.5,o=1/3;break;case"1:5万":n=.25,o=1/6;break;case"1:2.5万":n=.125,o=1/12;break;case"1:1万":n=.0625,o=1/24;break;case"1:5000":n=.03125,o=1/48}t=Math.max(-88,Math.min(88,t));var s,a=e,r=t=Math.abs(t),l=Math.floor(a/6+31),c="ABCDEFGHIJKLMNOPQRSTUV".charAt(Math.floor(r/4+1)-1),u={"1:100万":"","1:50万":"B","1:25万":"C","1:10万":"D","1:5万":"E","1:2.5万":"F","1:1万":"G","1:5000":"H"}[i];if(!u&&"1:100万"!==i)throw new Error("不支持的比例尺,请使用: 1:100万, 1:50万, 1:25万, 1:10万, 1:5万, 1:2.5万, 1:1万, 1:5000");s=c+l;var h=("000"+(Math.floor((4*Math.ceil(r/4)-r)/o)+1)).slice(-3),p=a-6*Math.floor(a/6),d=("000"+(Math.floor(p/n)+1)).slice(-3);switch(i){case"1:100万":return s;case"1:50万":case"1:25万":case"1:10万":case"1:5万":case"1:2.5万":case"1:1万":case"1:5000":break;default:throw new Error("不支持的比例尺")}return s+u+h+d}function m(){var e=s.camera.computeViewRectangle();if(2==s.scene.mode){var t=s.scene.canvas,i=new Cesium.Cartesian2(0,0),n=new Cesium.Cartesian2(t.clientWidth,t.clientHeight),o=s.scene.globe.ellipsoid,a=s.camera.pickEllipsoid(i,o),r=s.camera.pickEllipsoid(n,o);if(!a){var l=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,{x:0,y:0,z:6356755});i.y=l.y+5,a=s.camera.pickEllipsoid(i,o)}if(!r){var c=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,{x:0,y:0,z:-6356755});n.y=c.y-5,r=s.camera.pickEllipsoid(n,o)}var u=s.scene.globe.ellipsoid.cartesianToCartographic(a),h=s.scene.globe.ellipsoid.cartesianToCartographic(r);return e=(n.y-i.y)/(n.x-i.x)<=.49998752339363695?new Cesium.Rectangle(Cesium.Math.toRadians(-180),Cesium.Math.toRadians(-90),Cesium.Math.toRadians(180),Cesium.Math.toRadians(90)):new Cesium.Rectangle(u.longitude,h.latitude,h.longitude,u.latitude)}return e}t.postRenderEvent=function(){var i=e.viewer.camera.positionCartographic.height;switch(d){case"1:100万":o.position.alt=16e6;break;case"1:50万":o.position.alt=5e6;break;case"1:25万":o.position.alt=23e5;break;case"1:10万":o.position.alt=68e4;break;case"1:5万":o.position.alt=385e3;break;case"1:2.5万":o.position.alt=18e4;break;case"1:1万":o.position.alt=9e4;break;case"1:5000":o.position.alt=46e3}if(i>5*o.position.alt)return c=null,void t.removeAll();var n=!1,s=m(),a=Cesium.Math.toDegrees(s.west),r=Cesium.Math.toDegrees(s.south),u=Cesium.Math.toDegrees(s.east);a>u&&(u+=360),s={minLng:a,minLat:r,maxLng:u,maxLat:Cesium.Math.toDegrees(s.north)},c?(c.minLng>s.minLng||c.minLat>s.minLat||c.maxLng=50&&(h(d),n=!1):l=0},o.complete=function(){s.scene.postRender.addEventListener(t.postRenderEvent)},Object(u.i)(e,o,.5)}function y(e){for(var t,i,n=e.viewer,o=0;o=0;h--){var p=Array.from(n.keys())[h],d=n.get(p);if(d&&d.that)if("PolygonObject"===d.that.type){if(d.that.picking&&d.that.options.positions&&d.that.options.positions.length>=3){for(var m=turf.point([c.lng,c.lat]),f=[],v=0;v=3){for(var y=d.that.computeAssemble(d.that.options.positions,!0),b=turf.point([c.lng,c.lat]),C=[],w=0;w=3){for(var _=turf.point([c.lng,c.lat]),x=d.that.computeAttackArrow(d.that.options.positions),S=[],E=0;E=5){for(var D=turf.point([c.lng,c.lat]),M=d.that.computePincerArrow(d.that.options.positions),T=[],N=0;N=0;h--){var p=Array.from(n.keys())[h],d=n.get(p);if(d&&d.that)if("PolygonObject"===d.that.type){if(d.that.picking&&d.that.options.positions&&d.that.options.positions.length>=3){for(var m=turf.point([c.lng,c.lat]),f=[],v=0;v=3){for(var y=d.that.computeAssemble(d.that.options.positions,!0),b=turf.point([c.lng,c.lat]),C=[],w=0;w=3){for(var _=turf.point([c.lng,c.lat]),x=d.that.computeAttackArrow(d.that.options.positions),S=[],E=0;E=5){for(var D=turf.point([c.lng,c.lat]),M=d.that.computePincerArrow(d.that.options.positions),T=[],N=0;N\n
    \n
  • 属性
  • \n
\n ');var d=c.cartesian3Towgs84(i,e.viewer);(o=document.createElement("div")).id="custom-menu",o.style.position="absolute",o.style.width="110px",o.style.backgroundColor="#00000085",o.style.color="#ffffff",o.style.padding="6px 0",o.style.boxShadow="4px 4px 4px 0px rgba(0, 0, 0, 0.8)",o.innerHTML='\n
    \n
  • 绕鼠标点旋转
  • \n
\n
    \n
  • 文本框
  • \n
\n '.concat(u,"\n "),l.appendChild(o);var m=t.position.x,f=t.position.y;t.position.x+o.offsetWidth>l.offsetWidth&&(m=t.position.x-o.offsetWidth),t.position.y+o.offsetHeight>l.offsetHeight&&(f=t.position.y-o.offsetHeight),o.style.left=m+"px",o.style.top=f+"px",o.addEventListener("contextmenu",(function(e){e.preventDefault()}));for(var v=o.getElementsByTagName("li"),g={},y=function(t){v[t].addEventListener("mouseover",(function(){v[t].style.backgroundColor="#5e5e5e"})),v[t].addEventListener("mouseout",(function(){v[t].style.backgroundColor="unset"})),v[t].addEventListener("click",(function(){var i="";switch(v[t].innerHTML){case"绕鼠标点旋转":g.position=d,i="rotateAround";break;case"属性":s?(g.id=s,g.parentId=h.options.id):g.id=h.options.id,i="attribute";break;case"文本框":g.position=d,i="textBox"}a[e.div_id].callBack(i,g),l.removeChild(o)}))},b=0;be.length)&&(t=e.length);for(var i=0,n=Array(t);i0&&void 0!==arguments[0]?arguments[0]:0,t=Array.from(h[e].keys());t.forEach((function(t){document.documentElement.style.setProperty(t,h[e].get(t))}))}h[0].set("--color-sdk-base-rgb","0, 255, 255"),h[0].set("--color-sdk-gradual","rgb(0, 255, 255) 6.25%, rgb(0, 200, 255) 100%"),h[0].set("--color-sdk-bg-gradual","#00ffff33 0%, #00ffff00 100%"),h[0].set("--color-sdk-text-shadow","rgba(20, 118, 255, 1)"),h[1].set("--color-sdk-base-rgb","42, 200, 251"),h[1].set("--color-sdk-gradual","rgb(42, 200, 251) 6.25%, rgb(42, 145, 251) 100%"),h[1].set("--color-sdk-bg-gradual","#2ac8fb33 0%, #2ac8fb00 100%"),h[1].set("--color-sdk-text-shadow","rgba(20, 63, 255, 1)"),h[2].set("--color-sdk-base-rgb","187, 26, 41"),h[2].set("--color-sdk-gradual","rgb(187, 26, 41) 6.25%, rgb(236, 20, 20) 100%"),h[2].set("--color-sdk-bg-gradual","#bb1a2933 0%, #bb1a2900 100%"),h[2].set("--color-sdk-text-shadow","rgba(246, 8, 30, 1)");var m=i(10),f=i(12),v=i(23),g=i(16);function y(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return b(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i2&&void 0!==h[2]?h[2]:3,o=new u.a(t),a=i.orientation,!i.position){e.next=13;break}if(0===i.position.alt||i.position.alt){e.next=8;break}return e.next=7,o.getClampToHeight(i.position);case 7:i.position.alt=e.sent;case 8:r=0,a||(r=500),s=Cesium.Cartesian3.fromDegrees(i.position.lng,i.position.lat,i.position.alt+r),e.next=15;break;case 13:c=o.cal_envelope(i.positions),s=new Cesium.Rectangle(Cesium.Math.toRadians(c[3][0]),Cesium.Math.toRadians(c[3][1]),Cesium.Math.toRadians(c[1][0]),Cesium.Math.toRadians(c[1][1]));case 15:F(t),t.viewer.camera.flyTo({destination:s,duration:n,orientation:a,complete:i.complete});case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&e.viewer){var i=e.viewer;i.scene.screenSpaceCameraController.enableRotate=t,i.scene.screenSpaceCameraController.enableTranslate=t,i.scene.screenSpaceCameraController.enableZoom=t,i.scene.screenSpaceCameraController.enableTilt=t,i.scene.screenSpaceCameraController.enableLook=t}}function N(e,t){if(e&&e.viewer){S[e.viewer._element.className]||(S[e.viewer._element.className]={}),S[e.viewer._element.className].event&&S[e.viewer._element.className].event.destroy();var i=new u.a(e),n=e.viewer._element,o=e.proj,s=function(){switch(r){case"compass":var s=n.getElementsByClassName("compass")[0],u=n.getElementsByClassName("navigation-controls")[0];t[r]?(s&&(s.style.display="block"),u&&(u.style.display="flex")):(s&&(s.style.display="none"),u&&(u.style.display="none"));break;case"legend":var h=n.getElementsByClassName("distance-legend")[0];t[r]?h&&(h.parentNode.style.display="block"):h&&(h.parentNode.style.display="none");break;case"info":var p=n.getElementsByClassName("cesium-info")[0];if(t[r]){var d=function(){var t=a()(l.a.mark((function t(){var n,s;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(C){t.next=2;break}return t.abrupt("return");case 2:if(n=i.cartesian3Towgs84(C,e.viewer),"EPSG:4326"!==w){t.next=16;break}t.t0=k||"度",t.next="度"===t.t0?7:"度分"===t.t0?9:"度分秒"===t.t0?11:13;break;case 7:return p.innerHTML="\n
经度:".concat(Number(n.lng.toFixed(6)),"°
\n
纬度:").concat(Number(n.lat.toFixed(6)),"°
\n
高程:").concat(Number(n.alt.toFixed(2)),"米
\n "),t.abrupt("break",14);case 9:return p.innerHTML="\n
经度:".concat(o.degreesToDMS(n.lng,!0),"
\n
纬度:").concat(o.degreesToDMS(n.lat,!0),"
\n
高程:").concat(Number(n.alt.toFixed(2)),"米
\n "),t.abrupt("break",14);case 11:return p.innerHTML="\n
经度:".concat(o.degreesToDMS(n.lng,!1),"
\n
纬度:").concat(o.degreesToDMS(n.lat,!1),"
\n
高程:").concat(Number(n.alt.toFixed(2)),"米
\n "),t.abrupt("break",14);case 13:return t.abrupt("break",14);case 14:t.next=18;break;case 16:(s=o.convert([{x:n.lng,y:n.lat,z:n.alt}],"EPSG:4326",q(w,n))).points.length&&(p.innerHTML="\n
x:".concat(Number(s.points[0].x.toFixed(6)),'
\n
y:').concat(Number(s.points[0].y.toFixed(6)),'
\n
z:').concat(Number(s.points[0].z.toFixed(6)),"
\n "));case 18:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();p?(d(),p.style.display="block"):((p=document.createElement("div")).className="cesium-info",p.style.position="absolute",p.style.bottom="32px",p.style.right="240px",p.style["font-size"]="14px",p.style["background-color"]="rgba(47,53,60,.8)",p.style.color="#fff",p.style.padding="4px 10px",p.style["border-radius"]="18px",p.style.display="flex",p.innerHTML="EPSG:4326"===w?"\n
经度:-
\n
纬度:-
\n
高程:-
\n ":"\n
x:-
\n
y:-
\n
z:-
\n ",e.viewer._element.appendChild(p));var m=new c.a(e);S[e.viewer._element.className].event=m;m.mouse_move((function(e,t){C=t,d()}))}else p&&(p.style.display="none");break;case"frame":t[r]?(e.viewer.scene.debugShowFramesPerSecond=!0,setTimeout((function(){var t=e.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0],i=t.getElementsByClassName("cesium-performanceDisplay-defaultContainer")[0];i&&t.appendChild(i)}),50)):e.viewer.scene.debugShowFramesPerSecond=!1}};for(var r in t)s()}}function B(e,t){t=t?"billboard_default_url_"+t:"billboard_default_url";var i=Object(g.a)();e.startsWith("http")||(e.includes(":")||i&&(e=new URL(e,i).href));localStorage.setItem(t,e)}function j(e){return e=e?"billboard_default_url_"+e:"billboard_default_url",localStorage.getItem(e)}function A(e,t){_=!!t,Object(v.e)(e.viewer)}function L(){return _}function I(e,t){e&&e.viewer&&(x[e.viewer._element.className]||(x[e.viewer._element.className]={}),x[e.viewer._element.className].status=t,x[e.viewer._element.className].MoveHandler&&x[e.viewer._element.className].MoveHandler.destroy(),t&&(x[e.viewer._element.className].MoveHandler=new Cesium.ScreenSpaceEventHandler(e.viewer.canvas),x[e.viewer._element.className].MoveHandler.setInputAction((function(t){var i=e.viewer.scene.pick(t.endPosition),n=x[e.viewer._element.className].selectedId,o=e.entityMap.get(x[e.viewer._element.className].id);if(o&&o.features.has(n)){var s=o.features.get(n).features;for(var a in s)if(s[a].content._model){var r=s[a].customColor||Cesium.Color.fromCssColorString("#fff");s[a].color=Cesium.Color.fromCssColorString("rgba(".concat(Cesium.Color.floatToByte(r.red),",").concat(Cesium.Color.floatToByte(r.green),",").concat(Cesium.Color.floatToByte(r.blue),",").concat(r.alpha*(s[a].customAlpha||0===s[a].customAlpha?s[a].customAlpha:1),")"))}}if(i&&i.content)if("bim"===e.getIncetance(i.content.tileset.id).type){if(i.primitive&&i.primitive.id){var l=e.entityMap.get(i.primitive.id);if(n=i.getProperty("id"),l.features.has(n)){var c=l.features.get(n).features;for(var u in c)c[u].content._model&&(c[u].color=Cesium.Color.fromCssColorString("#ffeb3b"))}x[e.viewer._element.className].id=i.primitive.id,x[e.viewer._element.className].selectedId=n}}else i.primitive.id=null}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)))}function R(e){if(e&&e.viewer)return!!x[e.viewer._element.className]&&x[e.viewer._element.className].status}function z(e,t){if(e&&e.viewer)if(se(0),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),e.entityMap.forEach((function(e){e.editObj&&e.editObj.destroy(),e.ControllerObject&&e.ControllerObject.destroy()})),E[e.viewer._element.className]||(E[e.viewer._element.className]={}),E[e.viewer._element.className].animate&&TWEEN.remove(E[e.viewer._element.className].animate),E[e.viewer._element.className].event&&E[e.viewer._element.className].event.destroy(),t){var i=Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),n=Cesium.Math.toDegrees(e.viewer.camera.heading),o=Cesium.Cartesian3.distance(e.viewer.camera.position,i);T(e,!1);var s=e.viewer.camera.pitch;Cesium.Math.toDegrees(s)<-89.99&&(s=Cesium.Math.toRadians(-89.99)),E[e.viewer._element.className].animate=new TWEEN.Tween({angle:n}).to({angle:n-360},3e4).easing(TWEEN.Easing.Linear.None).repeat(1/0).onUpdate(function(){var t=a()(l.a.mark((function t(n,a){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.viewer){t.next=3;break}return TWEEN.remove(E[e.viewer._element.className].animate),t.abrupt("return");case 3:e.viewer.camera.lookAt(i,new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n.angle),s,o)),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);case 5:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}()).start();var r=new c.a(e);E[e.viewer._element.className].event=r,r.mouse_left_down((function(){E[e.viewer._element.className].animate&&TWEEN.remove(E[e.viewer._element.className].animate),E[e.viewer._element.className].event&&E[e.viewer._element.className].event.destroy(),T(e,!0),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)}))}else T(e,!0)}function F(e){e&&e.viewer&&E[e.viewer._element.className]&&(E[e.viewer._element.className].animate&&TWEEN.remove(E[e.viewer._element.className].animate),E[e.viewer._element.className].event&&E[e.viewer._element.className].event.destroy(),T(e,!0),e.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY))}function H(e){if(e&&e.entityMap){var t,i=y(e.entityMap);try{for(i.s();!(t=i.n()).done;){var n=o()(t.value,2),s=(n[0],n[1]);"TrajectoryMotion"===s.type&&s.viewFollow&&(s.viewFollow=!1)}}catch(e){i.e(e)}finally{i.f()}}}function V(e,t){if(e){var i,n=Object(f.a)().sdkD;n&&e!==n&&V(n,t);for(var o=0;o经度:".concat(Number(s.lng.toFixed(6)),"° \n
纬度:").concat(Number(s.lat.toFixed(6)),"°
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!0),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!0),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分秒":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!1),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!1),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ")}else{var a=o.convert([{x:s.lng,y:s.lat,z:s.alt}],"EPSG:4326",q(w,s));i.innerHTML="\n
x:".concat(Number(a.points[0].x.toFixed(6)),'
\n
y:').concat(Number(a.points[0].y.toFixed(6)),'
\n
z:').concat(Number(a.points[0].z.toFixed(6)),"
\n ")}}}}function q(e,t){var i;switch(e){case"EPSG:32601":var n=Math.floor((t.lng+180)/6+1);i=t.lat>0?"EPSG:"+(i=32600+n):"EPSG:"+(i=32700+n);break;case"EPSG:4534":i="EPSG:"+(i=Math.round(t.lng/3)-25+4534);break;case"EPSG:4513":i="EPSG:"+(i=Math.round(t.lng/3)-25+4513);break;case"EPSG:4502":var o=Math.floor(t.lng/6)+31;o<13&&(o=13),o>23&&(o=23),i="EPSG:"+(i=o-13+4502);break;case"EPSG:4491":var s=Math.floor(t.lng/6)+31;s<13&&(s=13),s>23&&(s=23),i="EPSG:"+(i=s-13+4491)}return i}function X(){return k}function Z(e,t){if("EPSG:4326"===w&&(k=t,e&&e.viewer&&e.viewer._element)){var i=e.viewer._element.getElementsByClassName("cesium-info")[0];if(C&&i){var n=new u.a,o=e.proj,s=n.cartesian3Towgs84(C,e.viewer);switch(t){case"度":i.innerHTML="\n
经度:".concat(Number(s.lng.toFixed(6)),"°
\n
纬度:").concat(Number(s.lat.toFixed(6)),"°
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!0),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!0),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ");break;case"度分秒":i.innerHTML="\n
经度:".concat(o.degreesToDMS(s.lng,!1),"
\n
纬度:").concat(o.degreesToDMS(s.lat,!1),"
\n
海拔高度:").concat(Number(s.alt.toFixed(2)),"米
\n ")}o.degreesToDMS(s.lng,!0)}}}function K(e,t){var i=new u.a;return e.viewer.camera.changed.addEventListener((function(n){t({position:i.cartesian3Towgs84(e.viewer.camera.position,e.viewer),orientation:{heading:e.viewer.camera.heading,pitch:e.viewer.camera.pitch,roll:e.viewer.camera.roll}})}))}function Q(e){"number"==typeof e&&(Cesium.RequestScheduler.maximumRequestsPerServer=e)}function $(e,t){e&&(e.viewer._disableKeyboardEvent=!t)}function ee(){var e=Number(Number(localStorage.getItem("IndexedDBMaxSize")).toFixed(0));return(isNaN(e)||e<1073741824)&&(e=1073741824),e}function te(e){var t=Number(Number(e).toFixed(0));(isNaN(t)||t<1073741824)&&(t=1073741824),Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.SetIndexedDBMaxSize(t),localStorage.setItem("IndexedDBMaxSize",t)}function ie(){var e=localStorage.getItem("ManageIndexexDBState");return"false"!==e&&Boolean(e)}function ne(e){"boolean"==typeof e?(Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.SetManageIndexexDBState(e),localStorage.setItem("ManageIndexexDBState",e)):console.error("参数必须为boolean")}function oe(){return Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.GetIndexedDBCurrentSize()}function se(e){Object(m.f)(e),Object(f.e)(e)}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;t||0==t||(t=1),e.viewer.scene.globe.translucency.frontFaceAlpha=t}},function(e,t,i){var n=i(22).default,o=i(25);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(36);e.exports=function(e,t,i){return(t=n(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"e",(function(){return E})),i.d(t,"d",(function(){return O})),i.d(t,"g",(function(){return T})),i.d(t,"h",(function(){return I})),i.d(t,"a",(function(){return H})),i.d(t,"b",(function(){return V})),i.d(t,"f",(function(){return W})),i.d(t,"c",(function(){return U}));var n,o,s,a=i(18),r=i.n(a),l=i(6),c=i.n(l),u=i(3),h=i.n(u),p=i(0),d=i.n(p),m=i(15),f=(i(11),i(7)),v=i(12),g=i(27),y=i(19),b=i(29);function C(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return w(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?w(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i=1;a--){for(r=!1,l=s.length-1;l>=1;l--)s[l].id&&i[l].id&&s[l].id===i[a].id&&(r=!0);r||n.viewer.scene.primitives.remove(i[a])}for(c=s.length-1;c>=1;c--){for(u=!1,h=i.length-1;h>=1;h--)s[c].id&&i[c].id&&s[c].id===i[h].id&&(u=!0,i[h].show=s[c].show,i[h].startColor=s[c].startColor,i[h].endColor=s[c].endColor,i[h].minimumSpeed=s[c].minimumSpeed,i[h].maximumSpeed=s[c].maximumSpeed,i[h].minimumParticleLife=s[c].minimumParticleLife,i[h].maximumParticleLife=s[c].maximumParticleLife,i[h].startScale=s[c].startScale,i[h].endScale=s[c].endScale,i[h].emissionRate=s[c].emissionRate,i[h].particleSize=s[c].particleSize,i[h].modelMatrix=s[c].modelMatrix);u||n.viewer.scene.primitives.add(s[c])}}case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e,t,i){var n=new Cesium.ScreenSpaceEventHandler(e.viewer.canvas);n.setInputAction((function(){s=t}),Cesium.ScreenSpaceEventType.LEFT_DOWN),n.setInputAction((function(){s=t}),Cesium.ScreenSpaceEventType.RIGHT_DOWN),n.setInputAction((function(){s=t}),Cesium.ScreenSpaceEventType.WHEEL),_.push(n)}function F(){var e,t=this.sdks[s];if(0===s?e=this.sdks[1]:1===s&&(e=this.sdks[0]),2===t.viewer.scene.mode)if(this.sdks[0].viewer.trackedEntity){var i=t.viewer.camera.positionCartographic.height;e.viewer.camera.lookAt(Cesium.Cartesian3.fromRadians(t.viewer.camera.positionCartographic.longitude,t.viewer.camera.positionCartographic.latitude,0),new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90),i))}else{this.sdks[1].viewer.trackedEntity&&(this.sdks[1].viewer.entities.remove(this.sdks[1].viewer.trackedEntity),this.sdks[1].viewer.trackedEntity=null);var n=this.tools.cartesian3Towgs84(Cesium.Cartesian3.fromRadians(t.viewer.camera.positionCartographic.longitude,t.viewer.camera.positionCartographic.latitude,t.viewer.camera.positionCartographic.height),t.viewer);e.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)})}else{var o=t.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(t.viewer.canvas.clientWidth/2,t.viewer.canvas.clientHeight/(2-(90+t.viewer.camera.pitch/(Cesium.Math.PI/180))/110)));o||(o=t.viewer.camera.positionWC);var a=this.tools.cartesian3Towgs84(t.viewer.camera.positionWC,t.viewer).alt,r=this.tools.cartesian3Towgs84(o,t.viewer);e.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(r.lng,r.lat,a)})}}function H(){return n}function V(){return o}function G(){n&&n.viewer.entities.add({show:!1,polygon:{hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray([100,50,100.0001,50,100.0001,50.0001]))}})}function W(e){s=e}function U(){return{sdkP:o,sdkD:n}}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=function(){return a()((function e(t){o()(this,e),this.sdk=t,this.viewer=t.viewer,this.handler=new Cesium.ScreenSpaceEventHandler(this.viewer.canvas)}),[{key:"mouse_left",value:function(e){var t=this;this.handler&&this.handler.setInputAction((function(i){var n=t.getcartesian(i);n&&e(i,n)}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}},{key:"mouse_left_down",value:function(e){var t=this;this.handler&&this.handler.setInputAction((function(i){var n=t.getcartesian(i);n&&e(i,n)}),Cesium.ScreenSpaceEventType.LEFT_DOWN)}},{key:"mouse_left_up",value:function(e){var t=this;this.handler&&this.handler.setInputAction((function(i){var n=t.getcartesian(i);n&&e(i,n)}),Cesium.ScreenSpaceEventType.LEFT_UP)}},{key:"mouse_move",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)}},{key:"mouse_right",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"mouse_right_down",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_DOWN)}},{key:"mouse_right_up",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=t.getcartesian(n);(o||i)&&e(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_UP)}},{key:"mouse_wheel",value:function(e){this.handler&&this.handler.setInputAction((function(){e()}),Cesium.ScreenSpaceEventType.WHEEL)}},{key:"getcartesian",value:function(e){var t=e.position||e.endPosition;e.position1&&e.position2&&(t={x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2});var i=this.viewer.scene.pickPosition(t);if(!i){for(var n=this.viewer.camera.getPickRay(t),o=this.viewer.scene.drillPickFromRay(n,10),s={},a=0;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i2&&void 0!==y[2]&&y[2],o=y.length>3?y[3]:void 0,_){e.next=6;break}return e.abrupt("return");case 6:if(s=_.entityMap,r=k&&k.entityMap,!i){e.next=15;break}if((c=s.get(i))&&c.show){e.next=12;break}return e.abrupt("return");case 12:v(i,o),e.next=35;break;case 15:h=C(_.entityMap),e.prev=16,h.s();case 18:if((p=h.n()).done){e.next=27;break}if(d=a()(p.value,2),m=d[0],(f=d[1])&&f.show){e.next=24;break}return e.abrupt("continue",25);case 24:v(m,o);case 25:e.next=18;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(16),h.e(e.t0);case 32:return e.prev=32,h.f(),e.finish(32);case 35:if(!n){e.next=37;break}return e.abrupt("return");case 37:case"end":return e.stop()}}),e,null,[[16,29,32,35]])})))).apply(this,arguments)}function L(e,t){k.viewer.imageryLayers.addImageryProvider(e.imageryProvider,t)}function I(e,t,i){for(var n,o=0;o0&&void 0!==arguments[0]?arguments[0]:[];if(S=Array.isArray(e)?e:[e],_&&k){var t=_.viewer._element.getElementsByClassName("YJ-custom-checkbox-left")[0],i=_.viewer._element.getElementsByClassName("YJ-custom-checkbox-right")[0];if(e&&0!==e.length){if(t&&i){t.style.display="none",i.style.display="none";for(var n=0,o=0,s=0;s2&&void 0!==arguments[2]?arguments[2]:0,o=null;return{that:Array.prototype.slice.call(e.querySelectorAll(t),0),stopPropagation:function(e){(e=e||window.event).stopPropagation?e.stopPropagation():e.cancelBubble=!0},hide:function(){n(e,t).that.forEach((function(e){e.style.cssText+="display:none;"}))},show:function(i){void 0!==i?n(e,t).that[i].style.cssText+="display:block;":n(e,t).that.forEach((function(e){e.style.cssText+="display:block;"}))},legp_searchList:function(t){var i=[];return n(e,"input[name="+t+"]").that.forEach((function(e){i.push(e.value)})),i},legp_search:function(s){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n(e,t).that[i];if(r){var l='
\n '.concat(a?'':''),'\n
\n
\n
');r.innerHTML=l,n(e,".cy_datalist input").that[i].oninput=function(t){var a=this.value;if(n(e,".cy_datalist dl").hide(),s.length>0){n(e,".cy_datalist dl").show();var r=new RegExp(a),l=!1;n(e,".cy_datalist dl").that[i].innerHTML="",s.forEach((function(t){r.test(t.name)&&(l=!0,n(e,".cy_datalist dl").that[i].innerHTML+='
'+t.name+"
")})),l||(n(e,".cy_datalist dl").that[i].innerHTML='
暂无数据
'),c()}},n(e,".cy_datalist input").that[i].onclick=function(t){n(e,".cy_datalist dl").hide();var i=1*t.srcElement.classList[1];i=i||0,"none"===n(e,".cy_datalist dl").that[i].style.display&&(0==s.length?this.innerHTML="暂无数据":n(e,".cy_datalist dl").show(i),n(e,".cy_datalist dl").that[i].innerHTML="",s.forEach((function(t){n(e,".cy_datalist dl").that[i].innerHTML+='
'+t.name+"
"})),c()),t.stopPropagation()},document.addEventListener("click",(function(){n(e,".cy_datalist dl").hide()}))}function c(){n(e,".cy_datalist dl dd").that.forEach((function(e){e.onclick=function(e){if(this&&this.attributes){var t=this.attributes.value.value;o=t,e.currentTarget.parentNode.previousElementSibling.value=t;var i=new Event("input",{bubbles:!0});e.currentTarget.parentNode.previousElementSibling.dispatchEvent(i)}}}))}},legp_searchActive:function(e){o=e}}}},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=i(15),l=function(){return a()((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"左键开始,右键结束",i=arguments.length>1?arguments[1]:void 0;o()(this,e),this.point=void 0,this.text=t,this.div=void 0,this.mouse_type=0,this.position=new Cesium.Cartesian3,this.viewer=i.viewer,this.create_tip(this.viewer)}),[{key:"set_text",value:function(e){this.div.getElementsByTagName("p")[0].innerText=e}},{key:"get_mouse_style",value:function(e){var t="";switch(e){case 1:t="move.png";break;default:t="arrow.png"}return"url(lib/img/"+t+"),auto"}},{key:"create_tip",value:function(e){this.create_tooltip()}},{key:"setPosition",value:function(e,t,i){this.position=e,this.move_tooltip(t,i)}},{key:"destroy",value:function(){this.viewer.entities.remove(this.point),this.remove_tooltip()}},{key:"create_tooltip",value:function(){var e=new r.a;this.div=document.createElement("div");this.div.setAttribute("style","position: absolute;z-index: 777;color: #ec131a;left:10px;top:0px;pointer-events: none;");var t=document.createElement("p");t.style.margin="0px",t.style.padding="0px",t.innerText=this.text,this.div.appendChild(t);var i=document.createElement("div");i.style.width="12px",i.style.height="12px",i.style.background="url(".concat(e.getSourceRootPath()+"/img/point.png",") 100% 100% no-repeat"),i.style.backgroundSize="100% 100%",i.style.position="absolute",i.style.left="-36px",i.style.top="-4px",this.div.style.display="none",this.div.appendChild(i),e=null,document.querySelector("body").appendChild(this.div)}},{key:"style_tip",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e._element.style.cursor=this.get_mouse_style(t)}},{key:"remove_tooltip",value:function(){document.querySelector("body").contains(this.div)&&document.querySelector("body").removeChild(this.div)}},{key:"move_tooltip",value:function(e,t){var i=0,n=0;if(this.div.style.display="block",this.viewer&&this.viewer._element){var o=this.viewer._element.getElementsByClassName("cesium-widget")[0].getElementsByTagName("canvas")[0];i=o.getBoundingClientRect().top+window.scrollY,n=o.getBoundingClientRect().left+window.scrollX}this.div.style.left=e+30+n+"px",this.div.style.top=t+i+"px"}}])}()},function(e,t,i){"use strict";var n,o,s,a,r=i(22),l=i.n(r),c=i(6),u=i.n(c),h=i(3),p=i.n(h),d=i(9),m=i.n(d),f=i(1),v=i.n(f),g=i(2),y=i.n(g),b=i(0),C=i.n(b),w=i(39),k=i.n(w),_=i(24),x=(i(20),i(13)),S=function(){var e=p()(C.a.mark((function e(t,n){var o,s,a,r,l,c,u,h,p,d,m;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=new _.a,s=new R(t),a=document.getElementsByClassName("proj-convert")[0].getElementsByClassName("content")[0],r=a.getElementsByClassName("item"),l=C.a.mark((function e(n){var l,c,u,h,p,d;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=r[n].getAttribute("data-type"),c=r[n].getElementsByClassName("convert")[0],u=r[n].getElementsByClassName("pickUp")[0],h=r[n].getElementsByClassName("icon-copy-box")[0],(p=new ClipboardJS(h,{text:function(e){var t;switch(l){case 0:case"0":t=r[n].getElementsByClassName("lng")[0].value+"°,"+r[n].getElementsByClassName("lat")[0].value+"°";break;case 1:case"1":t=a.getElementsByClassName("lng-dm-d")[0].value+"°"+a.getElementsByClassName("lng-dm-m")[0].value+"',"+a.getElementsByClassName("lat-dm-d")[0].value+"°"+a.getElementsByClassName("lat-dm-m")[0].value+"'";break;case 2:case"2":t=a.getElementsByClassName("lng-dms-d")[0].value+"°"+a.getElementsByClassName("lng-dms-m")[0].value+"'"+a.getElementsByClassName("lng-dms-s")[0].value+'",'+a.getElementsByClassName("lat-dms-d")[0].value+"°"+a.getElementsByClassName("lat-dms-m")[0].value+"'"+a.getElementsByClassName("lat-dms-s")[0].value+'"'}return t}})).on("success",(function(e){s.message({text:"已复制到剪切板"})})),p.on("error",(function(e){s.message({type:"warning",text:"复制失败"})})),d=i(26).default,u.addEventListener("click",(function(){new d(t).start((function(e,t){switch(1*l){case 0:r[n].getElementsByClassName("lng")[0].value=t.lng,r[n].getElementsByClassName("lat")[0].value=t.lat;break;case 1:var i=o.degreesToDMS(t.lng,!0),s=o.degreesToDMS(t.lat,!0),c=i.split("°"),u=c[1].split("'"),h=s.split("°"),p=h[1].split("'");a.getElementsByClassName("lng-dm-d")[0].value=c[0],a.getElementsByClassName("lng-dm-m")[0].value=u[0],a.getElementsByClassName("lat-dm-d")[0].value=h[0],a.getElementsByClassName("lat-dm-m")[0].value=p[0];break;case 2:var d=o.degreesToDMS(t.lng),m=o.degreesToDMS(t.lat),f=d.split("°"),v=f[1].split("'"),g=v[1].split('"'),y=m.split("°"),b=y[1].split("'"),C=b[1].split('"');a.getElementsByClassName("lng-dms-d")[0].value=f[0],a.getElementsByClassName("lng-dms-m")[0].value=v[0],a.getElementsByClassName("lng-dms-s")[0].value=g[0],a.getElementsByClassName("lat-dms-d")[0].value=y[0],a.getElementsByClassName("lat-dms-m")[0].value=b[0],a.getElementsByClassName("lat-dms-s")[0].value=C[0]}}))})),c.addEventListener("click",(function(){var e,t,i,c,u,h,p,d,m,f,v,g,y,b,C,w,k,_,x,S;switch(l){case 0:case"0":e=r[n].getElementsByClassName("lng")[0].value,t=r[n].getElementsByClassName("lat")[0].value,p=o.degreesToDMS(e,!0),d=o.degreesToDMS(t,!0),g=(v=p.split("°"))[1].split("'"),b=(y=d.split("°"))[1].split("'"),a.getElementsByClassName("lng-dm-d")[0].value=v[0],a.getElementsByClassName("lng-dm-m")[0].value=g[0],a.getElementsByClassName("lat-dm-d")[0].value=y[0],a.getElementsByClassName("lat-dm-m")[0].value=b[0],m=o.degreesToDMS(e),f=o.degreesToDMS(t),k=(w=(C=m.split("°"))[1].split("'"))[1].split('"'),S=(x=(_=f.split("°"))[1].split("'"))[1].split('"'),a.getElementsByClassName("lng-dms-d")[0].value=C[0],a.getElementsByClassName("lng-dms-m")[0].value=w[0],a.getElementsByClassName("lng-dms-s")[0].value=k[0],a.getElementsByClassName("lat-dms-d")[0].value=_[0],a.getElementsByClassName("lat-dms-m")[0].value=x[0],a.getElementsByClassName("lat-dms-s")[0].value=S[0];break;case 1:case"1":i=r[n].getElementsByClassName("lng-dm-d")[0].value,c=r[n].getElementsByClassName("lng-dm-m")[0].value,u=r[n].getElementsByClassName("lat-dm-d")[0].value,h=r[n].getElementsByClassName("lat-dm-m")[0].value,e=o.dmsToDecimal(i+"°"+c+"'",!0),t=o.dmsToDecimal(u+"°"+h+"'",!0),a.getElementsByClassName("lng")[0].value=e,a.getElementsByClassName("lat")[0].value=t,m=o.degreesToDMS(e),f=o.degreesToDMS(t),k=(w=(C=m.split("°"))[1].split("'"))[1].split('"'),S=(x=(_=f.split("°"))[1].split("'"))[1].split('"'),a.getElementsByClassName("lng-dms-d")[0].value=C[0],a.getElementsByClassName("lng-dms-m")[0].value=w[0],a.getElementsByClassName("lng-dms-s")[0].value=k[0],a.getElementsByClassName("lat-dms-d")[0].value=_[0],a.getElementsByClassName("lat-dms-m")[0].value=x[0],a.getElementsByClassName("lat-dms-s")[0].value=S[0];break;case 2:case"2":m=(i=r[n].getElementsByClassName("lng-dms-d")[0].value)+"°"+(c=r[n].getElementsByClassName("lng-dms-m")[0].value)+"'"+r[n].getElementsByClassName("lng-dms-s")[0].value+'"',f=(u=r[n].getElementsByClassName("lat-dms-d")[0].value)+"°"+(h=r[n].getElementsByClassName("lat-dms-m")[0].value)+"'"+r[n].getElementsByClassName("lat-dms-s")[0].value+'"',e=o.dmsToDecimal(m),t=o.dmsToDecimal(f),a.getElementsByClassName("lng")[0].value=e,a.getElementsByClassName("lat")[0].value=t,p=o.degreesToDMS(e,!0),d=o.degreesToDMS(t,!0),g=(v=p.split("°"))[1].split("'"),b=(y=d.split("°"))[1].split("'"),a.getElementsByClassName("lng-dm-d")[0].value=v[0],a.getElementsByClassName("lng-dm-m")[0].value=g[0],a.getElementsByClassName("lat-dm-d")[0].value=y[0],a.getElementsByClassName("lat-dm-m")[0].value=b[0]}s.message({text:"转换成功"});for(var E=0;ENumber(e.target.max)&&(t=Number(e.target.max)),e.target.min&&t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i-1){var i=e.src.split("/");i.pop(),t=i.join("/")}})),t}},{key:"cartesian3Towgs84",value:function(e,t){var i=t.scene.globe.ellipsoid,n=new Cesium.Cartesian3(e.x,e.y,e.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude),a=Cesium.Math.toDegrees(o.longitude),r=o.height<0?0:o.height;return{lng:Number(a.toFixed(8)),lat:Number(s.toFixed(8)),alt:Number(r.toFixed(2))}}},{key:"computeDistance",value:(i=p()(C.a.mark((function e(){var t,i,n,o,s,a,r,l,c,h,p,d,m,f,v,g,y,b,w,k,_,x,S,E,P,O,D,M,T=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=T.length>0&&void 0!==T[0]?T[0]:[],i=T.length>1&&void 0!==T[1]?T[1]:2,n=T.length>2&&void 0!==T[2]?T[2]:0,!(t.length<2)){e.next=7;break}return e.abrupt("return",0);case 7:o=0,e.t0=n,e.next="0"===e.t0||0===e.t0?11:"1"===e.t0||1===e.t0?13:"2"===e.t0||2===e.t0?15:48;break;case 11:for(s=0;s20?g/20:g,y=this.chunkLine(t,m),b=[],y.forEach((function(e,t){0===t?b=u()(e.geometry.coordinates):b.push(e.geometry.coordinates[1])})),w=[],k=j(b),e.prev=25,k.s();case 27:if((_=k.n()).done){e.next=37;break}return x=_.value,S=b.indexOf(x),e.next=32,this.sampleHeight({lng:x[0],lat:x[1],alt:0},S);case 32:(E=e.sent).position.alt=E.position.alt<0?0:E.position.alt,w.push(E);case 35:e.next=27;break;case 37:e.next=42;break;case 39:e.prev=39,e.t1=e.catch(25),k.e(e.t1);case 42:return e.prev=42,k.f(),e.finish(42);case 45:for(w.length,P=0;P0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e.length<2)return 0;var n=0;if(i){var o=[];e.forEach((function(e){o.push([e.lng,e.lat,e.alt])}));var s=turf.lineString(o);n=1e3*turf.length(s)}else for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:2;if(e.length<3)return 0;var i=[];e.forEach((function(e){i.push([e.lng,e.lat])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.tesselate(n);return Number(turf.area(o).toFixed(t))}},{key:"computeSignedArea",value:function(e,t){for(var i=[],n=[],o=0;oc?l/10:c/10;var u=new Cesium.PolygonGeometry.fromPositions({positions:Cesium.Cartesian3.fromDegreesArray(i),vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:s}),h=new Cesium.PolygonGeometry.createGeometry(u);if(!h||!h.attributes||!h.attributes.position)return 0;var p=h.indices,d=h.attributes.position.values;function m(t,i){var n=new Cesium.Cartesian3(d[3*i],d[3*i+1],d[3*i+2]);return e.scene.clampToHeight(n)||n}for(var f=0,v=0;v1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{steps:360};Number(t)<=0&&(t=.01);var n=[Number(e.lng),Number(e.lat)],o=turf.circle(n,t/1e3,i).geometry.coordinates[0],s=[];return o.forEach((function(e){s=s.concat(e)})),s}},{key:"createEllipse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{granularity:.1,semiMinorAxis:10,semiMajorAxis:20,bearing:0,height:0};t.granularity||(t.granularity=.1),t.height||(t.height=0),t.semiMinorAxis||(t.semiMinorAxis=1e-5),t.semiMajorAxis||(t.semiMajorAxis=1e-5);var i=new Cesium.EllipseOutlineGeometry({center:Cesium.Cartesian3.fromDegrees(Number(e.lng),Number(e.lat)),semiMajorAxis:Number(t.semiMajorAxis),semiMinorAxis:Number(t.semiMinorAxis),height:Number(t.height),granularity:Cesium.Math.toRadians(t.granularity),rotation:Cesium.Math.toRadians(t.bearing)}),n=Cesium.EllipseOutlineGeometry.createGeometry(i);if(!n||!n.attributes||!n.attributes.position)return[];for(var o=n.attributes.position.values,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=[];e.forEach((function(e){t.push(turf.point([e.lng,e.lat]))}));var i=turf.featureCollection(t),n=turf.center(i).geometry.coordinates;return{lng:n[0],lat:n[1]}}},{key:"computeMidpoint",value:function(e,t){var i=turf.point([e.lng,e.lat]),n=turf.point([t.lng,t.lat]),o=turf.midpoint(i,n).geometry.coordinates;return{lng:o[0],lat:o[1]}}},{key:"computeAttackArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.computeArrow(e,0)}},{key:"computePincerArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.computeArrow(e)}},{key:"computeArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length<3)return[];for(var i,n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length<2)return[];e.length;var i=new Array;if(e.forEach((function(e){i.push([e.lng,e.lat])})),2===i.length){var n=P.PlotUtils.mid(i[0],i[1]),o=P.PlotUtils.distance(i[0],n)/.9,s=P.PlotUtils.getThirdPoint(i[0],n,P.Constants.HALF_PI,o,!0);i=[i[0],s,i[1]]}var a=P.PlotUtils.mid(i[0],i[2]);i.push(a,i[0],i[1]);for(var r=[],l=void 0,c=void 0,h=void 0,p=[],d=0;d0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length<2)return[];var i=[e[0].lng,e[0].lat],n=[e[1].lng,e[1].lat];if(e[0].lng===e[1].lng&&e[0].lat===e[1].lat){if(t)return[e[0],e[0],e[0]];var o=Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat);return[o,o,o]}for(var s,a=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:"#2ab0c2",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="",s={7:10,8:3,9:4,10:4,11:4,12:2};switch(i&&(s[t+""]?i.polyline.width=i.polyline.oriWidth+s[t+""]:i.polyline.width=i.polyline.oriWidth),Number(t)){case 1:o=new Cesium.PolylineDashMaterialProperty({color:Cesium.Color.fromCssColorString(e),dashLength:10});break;case 2:o=new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:Cesium.Color.fromCssColorString(e)});break;case 3:o=new Cesium.PolylineFlowMaterialProperty({color:e,speed:n.rotate?n.speed:0-n.speed,rotate:n.rotate});break;case 4:o=new Cesium.PolylineFlowMultMaterialProperty({color:e,speed:n.rotate?n.speed:0-n.speed,rotate:n.rotate});break;case 5:case 6:var a,r=this;o=new Cesium.FlowDashedLineFlowMaterialProperty({color:e,uType:5==t?0:1,speed:n.rotate?n.speed:0-n.speed,space:n.space,scale:new Cesium.CallbackProperty((function(){if(r.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE3D){var e=i.polyline.positions.getValue();if(!Cesium.defined(e))return 1;for(var t=0,n=0;n0||0==t.speed?(n.width=s.width*(t.space+1),n.height=s.height,o.drawImage(s,s.width*(t.space/2),0)):(o.clearRect(0,0,n.width,n.height),n.width=s.width*(t.space+1),n.height=s.height,o.save(),o.translate(n.width/2,n.height/2),o.rotate(Math.PI),o.translate(-n.width/2,-n.height/2),o.drawImage(s,s.width*(t.space/2),0),o.restore());var a=0,r=0;i.polyline.material=new Cesium.LineTextureMaterialProperty({color:t.color,image:n,speed:t.speed,repeat:new Cesium.CallbackProperty((function(){if(e.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE3D){var o=i.polyline.positions.getValue(e.sdk.viewer.clock.currentTime);if(!Cesium.defined(o))return new Cesium.Cartesian2(1,1);for(var s=0,l=0;l700){var v=(u*=f/h/(t.space*(n.width/n.height*5)+1))/i.polyline.oriRepeat;i.polyline.oriSpeed=v,i.polyline.oriRepeatX=u,a=v,r=u,c=new Cesium.Cartesian2(u,v||1)}else c=new Cesium.Cartesian2(r||i.polyline.oriRepeatX,a||i.polyline.oriSpeed);return c}var g=Object(B.b)(),y=g.viewer.entities.getById(e.options.id),b=y.polyline.positions.getValue(g.viewer.clock.currentTime);if(!Cesium.defined(b))return new Cesium.Cartesian2(1,1);for(var C=0,w=0;w700){var D=(_*=O/x/(t.space*(n.width/n.height*5)+1))/y.polyline.oriRepeat;y.polyline.oriSpeed=D,y.polyline.oriRepeatX=_,a=D,r=_,k=new Cesium.Cartesian2(_,D||1)}else k=new Cesium.Cartesian2(r||y.polyline.oriRepeatX,a||y.polyline.oriSpeed);return k}))});var l=e.getSceenLine(i,t,n);l&&(i.polyline.oriRepeat=l)}}},{key:"getSceenLine",value:function(e,t,i){var n=new Cesium.Cartesian2(0,this.sdk.viewer.canvas.clientHeight),o=new Cesium.Cartesian2(this.sdk.viewer.canvas.clientWidth/2,this.sdk.viewer.canvas.clientHeight),s=this.sdk.viewer.camera.getPickRay(n),a=this.sdk.viewer.scene.globe.pick(s,this.sdk.viewer.scene),r=this.sdk.viewer.camera.getPickRay(o),l=this.sdk.viewer.scene.globe.pick(r,this.sdk.viewer.scene);if(a&&l){var c=Cesium.Cartesian3.distance(a,l)/e.polyline.width.getValue(),u=this.sdk.viewer.camera.positionCartographic.height,h=new Cesium.BoundingSphere(new Cesium.Cartesian3(-1e6,0,0),5e5),p=this.sdk.viewer.canvas.clientWidth,d=this.sdk.viewer.canvas.clientHeight,m=this.sdk.viewer.scene.camera.getPixelSize(h,p,d);return m>700?c*=m/u/(t.space*(i.width/i.height*5)+1):c=void 0,this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE3D?c:Object(B.b)().viewer.entities.getById(this.options.id).polyline.oriRepeatX}}},{key:"create_arrow1_picture",value:function(e){var t=new fabric.Canvas("canvas");t.width=150,t.height=75;var i=e,n=new fabric.Polygon([{x:t.width,y:t.height/2},{x:t.width-35,y:t.height},{x:t.width-35,y:t.height-20},{x:t.width/2,y:t.height-20},{x:t.width/2,y:20},{x:t.width-35,y:20},{x:t.width-35,y:0}],{fill:i});return t.add(n),t.toDataURL()}},{key:"create_arrow2_picture",value:function(e){var t=new fabric.Canvas("canvas");t.width=75,t.height=75;var i=e,n=new fabric.Polygon([{x:t.width,y:t.height/2},{x:t.width-35,y:t.height},{x:t.width-35-40,y:t.height},{x:t.width-40,y:t.height/2},{x:t.width-35-40,y:0},{x:t.width-35,y:0}],{fill:i});return t.add(n),t.toDataURL()}},{key:"sampleHeightMostDetailed",value:function(e,t){var i=[];return e.forEach((function(e){i.push(new Cesium.Cartographic.fromDegrees(e.lng,e.lat))})),t?t.viewer.scene.sampleHeightMostDetailed(i):this.sdk.viewer.scene.sampleHeightMostDetailed(i)}},{key:"flyHome",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(Object(N.w)(0),Object(N.f)(this.sdk),Object(N.g)(this.sdk),this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE){var t=this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE.destination,i=this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE.orientation;this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),orientation:{heading:Cesium.Math.toRadians(i.heading||0),pitch:Cesium.Math.toRadians(i.pitch||0),roll:Cesium.Math.toRadians(i.roll||0)},duration:e})}else this.sdk.viewer.camera.flyHome(e)}},{key:"setPickStatus",value:function(){}},{key:"create_point_buffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{steps:10},n=turf.point([Number(e.lng),Number(e.lat)]),o=turf.buffer(n,Number(t)/1e3,i);return o.geometry.coordinates}},{key:"create_line_buffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(1===e.length)return this.create_point_buffer(e[0],t);if(0===e.length)return!1;var i=[];e.forEach((function(e){i.push([Number(e.lng),Number(e.lat)])}));var n=turf.lineString(i),o=turf.buffer(n,Number(t)/1e3);return o.geometry.coordinates}},{key:"create_area_buffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(1===e.length)return this.create_point_buffer(e[0],t);if(0===e.length)return!1;if(2===e.length)return this.create_line_buffer(e,t);var i=[];e.forEach((function(e){i.push([Number(e.lng),Number(e.lat)])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.buffer(n,Number(t)/1e3);return o.geometry.coordinates}},{key:"cal_envelope",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!(e.length<2)){var t=[];e.forEach((function(e){t.push(turf.point([e.lng,e.lat]))}));var i=turf.featureCollection(t);return turf.envelope(i).geometry.coordinates[0]}console.error("坐标数量不能少于2个")}},{key:"chunkLine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(e.length<2)return[];var i=[];e.forEach((function(e){i.push([e.lng,e.lat])}));var n=turf.lineString(i),o=turf.lineChunk(n,t/1e3),s=new Map;return o.features.forEach((function(e){e.geometry.coordinates.forEach((function(e){var t=e.join(","),i={lng:e[0],lat:e[1]};s.set(t,i)}))})),o.features}},{key:"billboardAnimation",value:function(e,t){var i=t.id,n=t.offset,o=void 0===n?10:n,s=(t.times,e.entities.getById(i));if(s){var a=Math.PI,r=a/60,l=0,c=this.cartesian3Towgs84(s.position.getValue(),e),u=setInterval((function(){l+=r;var e=o*Math.sin(l)+c.alt;l>a&&(l=0),s.position=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,e)}),30);setTimeout((function(){clearInterval(u),s.position=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt)}),3e3)}}},{key:"calSector",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:25,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:45,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:360,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=turf.point([e.lng,e.lat]),r=turf.sector(a,t/1e3,i,n,{steps:o}).geometry.coordinates,l=[];return r.forEach((function(e){e.forEach((function(e){var t;t=s?{lng:e[0],lat:e[1]}:Cesium.Cartesian3.fromDegrees(e[0],e[1]),l.push(t)}))})),l}},{key:"getClampToHeight",value:(e=p()(C.a.mark((function e(t){var i,n,o,s,a,r,l=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>1&&void 0!==l[1]?l[1]:[],this.sdk&&this.sdk.viewer){e.next=3;break}return e.abrupt("return",0);case 3:return n=new Cesium.Cartesian3.fromDegrees(t.lng,t.lat),e.prev=4,e.next=7,this.sdk.viewer.scene.clampToHeight(n,i);case 7:if(e.t0=e.sent,e.t0){e.next=10;break}e.t0=n;case 10:o=e.t0,e.next=16;break;case 13:e.prev=13,e.t1=e.catch(4),o=n;case 16:return e.next=18,this.cartesian3Towgs84(o,this.sdk.viewer).alt;case 18:if(s=e.sent,a=0,e.prev=20,!this.sdk.viewer.scene.terrainProvider.availability){e.next=26;break}return e.next=24,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(t.lng,t.lat)]);case 24:(r=e.sent)[0].height&&(a=r[0].height);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(20),a=0;case 31:if(!(s>a)){e.next=35;break}return e.abrupt("return",Number(s.toFixed(2)));case 35:return e.abrupt("return",Number(a.toFixed(2)));case 36:case"end":return e.stop()}}),e,this,[[4,13],[20,28]])}))),function(t){return e.apply(this,arguments)})},{key:"deepCopyObj",value:function(e){var t=null;if(Array.isArray(e)){t=[];for(var i=0;i0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e?S(this.sdk,t):E()}},{key:"projectionConvert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e?M(this.sdk,t):T()}},{key:"exportExcel",value:function(e){var t="";for(var i in e[0])t+=''.concat(i,"");t+="";for(var n,o='{rows}
',s=function(e,t){return e.replace(/{(\w+)}/g,(function(e,i){return t[i]}))},a="",r="",l=0;l",e[l])r+=s('{data}',{nameType:"String",data:e[l][c]});r+="",l>0&&l/6e4%1==0&&(a+=s(o,{rows:r,nameWS:"Sheet"+l}),r="",r+=t)}a+=s(o,{rows:r,nameWS:"Sheet"}),r="",n=s('Axel Richter{created}{worksheets}',{created:(new Date).getTime(),worksheets:a});var u,h=document.createElement("A");h.href="data:application/vnd.ms-excel;base64,"+(u=n,window.btoa(unescape(encodeURIComponent(u)))),h.download="矢量数据导出.xls",h.target="_blank",document.body.appendChild(h),h.click(),document.body.removeChild(h)}},{key:"decompressGzip",value:function(e){var t=pako.inflate(e);return(new TextDecoder).decode(t)}},{key:"cmykToRgb",value:function(e){var t=e.c,i=e.m,n=e.y,o=e.k,s={r:0,g:0,b:0};return s.c=t/100,s.m=i/100,s.y=n/100,s.k=o/100,s.r=1-Math.min(1,s.c*(1-s.k)+s.k),s.g=1-Math.min(1,s.m*(1-s.k)+s.k),s.b=1-Math.min(1,s.y*(1-s.k)+s.k),s.r=Math.round(255*s.r),s.g=Math.round(255*s.g),s.b=Math.round(255*s.b),"rgb(".concat(s.r,", ").concat(s.g,", ").concat(s.b,")")}},{key:"convertPxToRem",value:function(e,t){var i=parseFloat(getComputedStyle(document.documentElement).fontSize),n=[],o=[];if(t){n=document.getElementById(e.div_id).querySelectorAll(t);for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:[],t=e.length,i=0,n=0,o=0;o0&&i<0||n<0&&i>0)return!1;i=n}}return!0}},{key:"getDateTimeString",value:function(){var e=new Date,t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0"),r=String(e.getMilliseconds()).padStart(3,"0");return"".concat(t).concat(i).concat(n).concat(o).concat(s).concat(a).concat(r)}},{key:"replaceHost",value:function(e,t){var i=e;if(!e||!t)return e;try{if(e.startsWith("http")){var n=/^[^@]+@/;n.test(e)&&(e=e.replace(n,"")),/^[a-z]+:\/\//i.test(e)||(e="http://"+e);var o=new URL(e),s=new URL(t),a=o.hostname,r=o.port;return a.startsWith("[")&&a.endsWith("]")&&(a=a.slice(1,-1)),"localhost"!==a&&"127.0.0.1"!==a||55110===parseInt(r,10)||(o.port=s.port,o.protocol=s.protocol,i=o.toString()),i}return e.includes(":")||this.options.host&&(i=new URL(e,this.options.host).href),i}catch(e){return i}}},{key:"message",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type||"success",i=e.text||"",n=(e.duration,document.getElementById("YJ-custom-message"));n&&document.body.removeChild(n),n=document.createElement("div"),n.id="YJ-custom-message","success"==t?n.innerHTML='\n '.concat(i,"\n "):"warning"==t&&(n.innerHTML='\n '.concat(i,"\n ")),document.body.appendChild(n),n.classList.add(t)}},{key:"pointDistance",value:function(e,t){var i=Cesium.Cartesian3.fromDegrees(e.lng,e.lat),n=Cesium.Cartesian3.fromDegrees(t.lng,t.lat);return Cesium.Cartesian3.distance(n,i)}},{key:"mercatorToWGS84",value:function(e,t){var i=t/20037508.34*180;return[e/20037508.34*180,i=180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2)]}},{key:"convertCGCStoWGS84",value:function(e,t,i){return proj4("+proj=tmerc +lat_0=0 +lon_0="+i+" +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[e,t])}},{key:"convertCGCSToWGS84WithZone",value:function(e,t){var i=e.toString(),n=parseInt(i.substring(0,2)),o=parseInt(i.substring(2)),s="+proj=tmerc +lat_0=0 +lon_0=".concat(3*n," +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");return proj4(s,"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[o,t])}},{key:"convertCGCS2000_6ToWGS84",value:function(e,t,i){return proj4("+proj=tmerc +lat_0=0 +lon_0="+i+" +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[e,t])}},{key:"convertCGCS2000_6ToWGS84WithZone",value:function(e,t){var i=e.toString(),n=6*parseInt(i.substring(0,2))-3,o=parseInt(i.substring(2));return proj4("+proj=tmerc +lat_0=0 +lon_0="+n+" +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs","+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",[o,t])}}],[{key:"_md5",value:function(e){return k()(e).toUpperCase()}}]);var e,t,i}(),R=t.a=I},function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return f})),i.d(t,"a",(function(){return d}));var n=i(3),o=i.n(n),s=i(0),a=i.n(s);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isc:!1,excel:!1,flv:!1,rtsp:!1,hls:!1,host:"",username:"",password:"",token:""};return new Promise((function(t,i){var n=v(),o=["/custom/css/index.css","/arrow/algorithm.js","/arrow/plotUtil.js","/3rdparty/turf.min.js","/3rdparty/fabric.min.js","/3rdparty/proj4.js","/3rdparty/pako.min.js","/3rdparty/heatmap.js","/3rdparty/tween.umd.js","/Cesium/Cesium.js","/Cesium/Widgets/widgets.css","/3rdparty/ewPlugins.min.js","/3rdparty/wangeditor/index.js","/3rdparty/wangeditor/style.css","/3rdparty/html2canvas.min.js","/3rdparty/kriging.js","/3rdparty/echarts.min.js","/3rdparty/clipboard.min.js","/3rdparty/libgif.js","/3rdparty/liveplayer/liveplayer-element.min.js","/3rdparty/jedate/jedate.min.js","/3rdparty/jedate/skin/jedate.css"];window.YJSDK3rdpartyResourceAddress=n+"/3rdparty",e.ws&&o.push("/3rdparty/reconnecting-websocket.js"),(e.flv||e.rtsp)&&o.push("/3rdparty/flv.min.js");var s=document.createElement("script");s.setAttribute("type","module"),s.textContent="\n import * as THREE from '".concat(n,"/3rdparty/three/three.module.min.js';\n window.THREE = THREE\n "),document.querySelector("html").appendChild(s);var a=document.createElement("script");a.setAttribute("type","module"),a.textContent="\n import { SVGLoader } from '".concat(n,"/3rdparty/three/jsm/loaders/SVGLoader.js';\n window.SVGLoader = SVGLoader\n "),document.querySelector("html").appendChild(a);var r=[];o.forEach((function(e){var t;e.endsWith(".js")?((t=document.createElement("script")).setAttribute("type","text/javascript"),t.setAttribute("src",n+e)):((t=document.createElement("link")).setAttribute("rel","stylesheet"),t.setAttribute("href",n+e)),document.querySelector("html").appendChild(t);var i=new Promise((function(e,i){t.onload=function(){e()}})).then((function(e){return e}));r.push(i)})),Promise.all(r).then((function(i){var o,s;(o=document.createElement("script")).setAttribute("type","text/javascript"),o.setAttribute("src",n+"/3rdparty/viewerCesiumNavigationMixin.min.js"),document.querySelector("html").appendChild(o),o.onload=function(){p(e.host),e.username?u(e).then((function(e){t()})):(m(e.token),t())},(s=document.createElement("script")).setAttribute("type","text/javascript"),s.setAttribute("src",n+"/3rdparty/CesiumHeatmap.js"),document.querySelector("html").appendChild(s)})).catch((function(e){i(e)}))}))}var l="9e549c39c542fc9f835c2a5c260f8cc1",c="40ef4712c26360d01e397ebcb0d031ca";function u(){return h.apply(this,arguments)}function h(){return(h=o()(a.a.mark((function e(){var t,i,n,o=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,fetch((t.host||"")+"/yjearth4.0/api/v1/user/sign-in",{method:"post",body:JSON.stringify({username:t.username,password:t.password}),headers:{"Content-Type":"application/json"}});case 3:return i=e.sent,e.next=6,i.text();case 6:n=e.sent,0===(n=JSON.parse(n)).code&&(p(t.host),n.token?m(n.token):m(n.data.token));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){localStorage.setItem(c,e||"")}function d(){return localStorage.getItem(c)||""}function m(e){localStorage.setItem(l,e)}function f(){return localStorage.getItem(l)}function v(){var e=document.querySelectorAll("script"),t="";return e.forEach((function(e){if(e.src.indexOf("YJEarth.min.js")>-1){var i=e.src.split("/");i.pop(),t=i.join("/")}})),t}},function(e,t,i){var n=i(38);function o(){return e.exports=o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var o=n(e,t);if(o){var s=Object.getOwnPropertyDescriptor(o,t);return s.get?s.get.call(arguments.length<3?e:i):s.value}},e.exports.__esModule=!0,e.exports.default=e.exports,o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(43),o=i(44),s=i(34),a=i(45);e.exports=function(e,t){return n(e)||o(e,t)||s(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"g",(function(){return h})),i.d(t,"a",(function(){return p})),i.d(t,"j",(function(){return g})),i.d(t,"m",(function(){return y})),i.d(t,"i",(function(){return d})),i.d(t,"c",(function(){return m})),i.d(t,"l",(function(){return b})),i.d(t,"n",(function(){return C})),i.d(t,"h",(function(){return f})),i.d(t,"b",(function(){return v})),i.d(t,"k",(function(){return w})),i.d(t,"o",(function(){return k})),i.d(t,"d",(function(){return _})),i.d(t,"f",(function(){return x})),i.d(t,"e",(function(){return S}));var n=null,o=null,s=null,a=new Map,r=new Map,l=new Map;function c(e,t){var i=t.scene.globe.ellipsoid,n=new Cesium.Cartesian3(e.x,e.y,e.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude);return{lng:Cesium.Math.toDegrees(o.longitude),lat:s,alt:o.height<0?0:o.height}}function u(e,t){t.endPosition&&(t.endPosition.y-=2);var i=t.position||t.endPosition,n=e.viewer.scene.pickPosition(i);if(!n){var o=e.viewer.camera.getPickRay(i);n=e.viewer.scene.globe.pick(o,e.viewer.scene)}return n}function h(e,t){if(e&&e.viewer){var i=!0;(n=new Cesium.ScreenSpaceEventHandler(e.viewer.canvas)).setInputAction((function(n){var o=e.viewer.scene.pickPosition(n.position);if(!o){var s=e.viewer.camera.getPickRay(n.position);o=e.viewer.scene.globe.pick(s,e.viewer.scene)}if(o){var r=c(o,e.viewer);if(t&&t(r),i&&(i=!1,setTimeout((function(){i=!0}),600),!YJ.Measure.GetMeasureStatus()&&o)){for(var l=!1,h=a.size-1;h>=0;h--){var p=Array.from(a.keys())[h],d=a.get(p);if(d&&d.that)if("PolygonObject"===d.that.type){if(d.that.picking&&d.that.options.positions&&d.that.options.positions.length>=3){for(var m=turf.point([r.lng,r.lat]),f=[],v=0;v=3){for(var y=d.that.computeAssemble(d.that.options.positions,!0),b=turf.point([r.lng,r.lat]),C=[],w=0;w=3){for(var _=turf.point([r.lng,r.lat]),x=d.that.computeAttackArrow(d.that.options.positions),S=[],E=0;E=5){for(var D=turf.point([r.lng,r.lat]),M=d.that.computePincerArrow(d.that.options.positions),T=[],N=0;N1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];l()(this,e),this.container=t,this.options=m({},i),this.options.ismove=!0,!1===i.ismove&&(this.options.ismove=i.ismove),this.closeCallBack=i.closeCallBack,this._element={},this._element_style=void 0,this.only=n}),[{key:"init",value:(e=o()(p.a.mark((function e(){var t,i,n,o=this;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.only&&this.closeAll(),v.push(this),this.isDestroy=!1,this._element.body=document.createElement("div"),this._element.body.className="YJ-custom-base-dialog",this._element.body.style.top=this.options.top,this._element.body.style.bottom=this.options.bottom,this._element.body.style.left=this.options.left,this._element.body.style.right=this.options.right,this.container.appendChild(this._element.body),this._element.title=document.createElement("div"),this._element.title.className="title-box",this._element.title.innerHTML=''.concat(this.options.title||"","")+'',this._element.body.appendChild(this._element.title),e.next=16,document.createElement("div");case 16:return this._element.content=e.sent,this._element.content.className="content",this._element.body.appendChild(this._element.content),e.next=21,document.createElement("div");case 21:return this._element.foot=e.sent,this._element.foot.className="foot",this._element.foot.innerHTML='\n \n ',this._element.body.appendChild(this._element.foot),e.next=27,document.createElement("div");case 27:for((t=e.sent).style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.backdropFilter="blur(2px)",t.style.zIndex="-999999",this._element.body.appendChild(t),this._element.body.getElementsByClassName("close-box")[0].addEventListener("click",(function(){o.close()})),i=this._element.body.getElementsByClassName("close"),n=0;n=0;t--)e[t].dataset&&"YJ_style_dialog"===e[t].dataset.name&&document.getElementsByTagName("head")[0].removeChild(e[t]);this._element.body&&this._element.body.parentNode&&this.container.removeChild(this._element.body),this._element.body=null,this._element.title=null,this._element.content=null,this._element.foot=null,this._element_style=null,this.isDestroy=!0,this.closeCallBack&&(this.closeCallBack(),this.closeCallBack=null)}},{key:"closeAll",value:function(){for(var e=v.length-1;e>=0;e--)v[e].close(),v.splice(e,1)}},{key:"titleAppChild",value:function(e){this._element.title.appendChild(e)}},{key:"contentAppChild",value:function(e){this._element.content.appendChild(e)}},{key:"footAppChild",value:function(e,t){t?this._element.foot.insertBefore(e,t):this._element.foot.prepend(e)}},{key:"moveDiv",value:function(){var e=this,t=0,i=0,n=0,o=0,s=this._element.body,a=this;s.onmousedown=function(s){if("title-box"===s.toElement.className){var r=e._element.body.offsetHeight,l=e._element.body.offsetWidth;t=s.clientX,i=s.clientY;var c=window.getComputedStyle(e._element.body).left,u=window.getComputedStyle(e._element.body).top;n=1*c.substr(0,c.indexOf("px")),o=1*u.substr(0,u.indexOf("px"));var h=document.documentElement.clientHeight,p=document.documentElement.clientWidth;window.onmousemove=function(e){e.preventDefault();var s=e.clientX,c=e.clientY,u=s-(t-n),d=c-(i-o);u<0?u=0:u+l>p&&(u=p-l),d<=0?d=0:d+r>h&&(d=h-r),a._element.body.style.left=u+"px",a._element.body.style.top=d+"px",a._element.body.style.bottom="unset",a._element.body.style.right="unset"},document.onmouseup=function(e){window.onmousemove=null},window.ondragend=function(e){window.onmousemove=null}}},document.onmouseup=function(e){window.onmousemove=null},window.ondragend=function(e){window.onmousemove=null}}}]);var e}(),v=[];t.a=f},function(e,t,i){"use strict";var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=i(8),l=i.n(r),c=i(5),u=i.n(c),h=i(4),p=i.n(h),d=i(15),m=i(10);function f(e,t,i){return t=u()(t),l()(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,i||[],u()(e).constructor):t.apply(e,i))}var v=function(e){function t(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return o()(this,t),(i=f(this,t,[e,n])).viewer=e.viewer,i.entityHasCreated=!1,i.event=null,i.tip=null,i.points_ids=[],i.color=n.color||"rgba(185,14,14,0.58)",i._is2D=s,i._sdk2D=Object(m.a)(),i}return p()(t,e),a()(t,[{key:"create_point",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.viewer,i=this.randomString();return t.entities.add(new Cesium.Entity({id:i,position:e,billboard:{image:this.getSourceRootPath()+"/img/point.png",color:Cesium.Color.WHITE.withAlpha(.99)}})),i}},{key:"remove_entity",value:function(e){this.viewer.entities.removeById(e),!this._is2D&&this._sdk2D&&this._sdk2D.viewer&&this._sdk2D.viewer.entities&&this._sdk2D.viewer.entities.removeById(e)}},{key:"start",value:function(){}},{key:"end",value:function(){var e=this;YJ.Measure.SetMeasureStatus(!1),this.entityHasCreated=!1,this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy(),this.tip&&this.tip.destroy(),this.points_ids.forEach((function(t){e.remove_entity(t)}))}}])}(d.a);t.a=v},function(e,t){function i(t){return e.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return r})),i.d(t,"d",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"e",(function(){return c}));var n=i(15),o=i(7);function s(e){var t=new n.a,i=new Cesium.CustomDataSource("sdk-dataSource1");e.dataSources.add(i).then((function(e){var i;e.clustering.enabled=!1,e.clustering.pixelRange=15,e.clustering.minimumClusterSize=2;for(var n=new Cesium.PinBuilder,s=(n.fromText("50+",Cesium.Color.RED,48).toDataURL(),n.fromText("40+",Cesium.Color.ORANGE,48).toDataURL(),n.fromText("30+",Cesium.Color.YELLOW,48).toDataURL(),n.fromText("20+",Cesium.Color.GREEN,48).toDataURL(),n.fromText("10+",Cesium.Color.BLUE,48).toDataURL(),new Array(8)),a=0;a=1e3?(i.billboard.scale=1.5,i.label.pixelOffset=new Cesium.Cartesian2(-28,-46)):e.length>=100?(i.billboard.scale=1.25,i.label.pixelOffset=new Cesium.Cartesian2(-21,-40)):e.length>=50?(i.billboard.scale=1.1,i.label.pixelOffset=new Cesium.Cartesian2(-16,-36)):e.length>=40?(i.billboard.scale=1.05,i.label.pixelOffset=new Cesium.Cartesian2(-16,-34)):e.length>=30?(i.billboard.scale=1,i.label.pixelOffset=new Cesium.Cartesian2(-16,-32)):e.length>=20?(i.billboard.scale=.95,i.label.pixelOffset=new Cesium.Cartesian2(-16,-30)):e.length>=10?(i.billboard.scale=.9,i.label.pixelOffset=new Cesium.Cartesian2(-16,-28)):(i.billboard.scale=.8,i.label.pixelOffset=new Cesium.Cartesian2(-11,-25))}));var n=e.clustering.pixelRange;e.clustering.pixelRange=0,e.clustering.pixelRange=n}();var r={pixelRange:15,minimumClusterSize:2};function l(t){Cesium.knockout.getObservable(r,t).subscribe((function(i){e.clustering[t]=i}))}Cesium.knockout.track(r),l("pixelRange"),l("minimumClusterSize")}))}function a(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.viewer,n=0;n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n={points:[],code:0,message:""};if(!this.name_map.has(t)&&!this.epsg_map.has(t))return n.code=1,n.message="不支持的坐标系:"+t,n;if(!this.name_map.has(i)&&!this.epsg_map.has(i))return n.code=1,n.message="不支持的坐标系:"+i,n;var o=(this.name_map.get(t)||this.epsg_map.get(t)).epsg,s=(this.name_map.get(i)||this.epsg_map.get(i)).epsg,a=proj4.defs(o),r=proj4.defs(s);return e.forEach((function(e){var t=Number(e.x),i=Number(e.y),o=Number(e.z||0),s=proj4(a,r,[t,i]);n.points.push({x:Number(s[0].toFixed(10)),y:Number(s[1].toFixed(10)),z:o})})),n}},{key:"getAllProjection",value:function(){return Array.from(this.name_map.values())}},{key:"projectionIsExists",value:function(e){return this.name_map.has(e)||this.epsg_map.has(e)}},{key:"degreesToDMS",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function i(e){var t=e.toString(),i=t.indexOf(".");return-1!==i?t.length-i-1:0}function n(e){return Math.pow(10,e)}var o=!1;e<0&&(o=!0),e=Math.abs(e);var s=Math.floor(e),a=n(i(e)),r=Math.floor((e-s)*a*60)/a,l=Math.floor(r);o&&(s=-s);var c=n(i(r)),u=Math.floor((r-l)*c)/c*60;return t?s+"°"+Math.floor(1e4*r)/1e4+"'":s+"°"+l+"'"+Math.floor(100*u)/100+'"'}},{key:"dmsToDecimal",value:function(e,t){var i,n,o;if(t){var s=e.split("°"),a=s[1].split("'");i=s[0],n=a[0],console.log(i,n);var r=Math.pow(10,8),l=Number(i*r)+n*r/60;return Math.round(l)/r}var c=e.split("°"),u=c[1].split("'"),h=u[1].split('"');i=c[0],n=u[0],o=h[0],console.log(i,n,o);var p=Math.pow(10,8),d=Number(i*p)+n*p/60+o*p/3600;return Math.round(d)/p}}])}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.r(t);var n=i(1),o=i.n(n),s=i(2),a=i.n(s),r=i(8),l=i.n(r),c=i(5),u=i.n(c),h=i(4),p=i.n(h),d=i(14),m=i(11);function f(e,t,i){return t=u()(t),l()(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,i||[],u()(e).constructor):t.apply(e,i))}var v=function(e){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return o()(this,t),f(this,t,[e,i,n])}return p()(t,e),a()(t,[{key:"start",value:function(e){var t=this;if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i=void 0;YJ.Measure.SetMeasureStatus(!0),this.tip=new d.a("左键确定,右键结束;",this.sdk),this.event=new m.a(this.sdk),this.event.mouse_left((function(n,o){t.end();var s=t.cartesian3Towgs84(i||o,t.viewer);e(null,s,Cesium)})),this.event.mouse_right((function(i,n){t.end(),e(!1)})),this.event.mouse_move((function(e,n){i=n,t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),this.event.gesture_pinck_start((function(n,o){var s=new Date;t.event.gesture_pinck_end((function(){if(new Date-s>=500)t.end(),e(!1);else{t.end();var n=t.cartesian3Towgs84(i||o,t.viewer);e(null,n)}}))})),!this._is2D&&this._sdk2D&&(this.event2D=new m.a(this._sdk2D),this.event2D.mouse_left((function(n,o){t.end();var s=t.cartesian3Towgs84(i||o,t.viewer);e(null,s,Cesium)})),this.event2D.mouse_right((function(i,n){t.end(),e(!1)})),this.event2D.mouse_move((function(e,n){i=n,t.tip.setPosition(n,e.endPosition.x+t.viewer.canvas.width,e.endPosition.y)})),this.event2D.gesture_pinck_start((function(n,o){var s=new Date;t.event2D.gesture_pinck_end((function(){if(new Date-s>=500)t.end(),e(!1);else{t.end();var n=t.cartesian3Towgs84(i||o,t.viewer);e(null,n)}}))})))}}},{key:"end",value:function(){YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy(),this.tip&&this.tip.destroy()}}])}(i(21).a);t.default=v},function(e,t,i){"use strict";i.d(t,"a",(function(){return m})),i.d(t,"b",(function(){return f})),i.d(t,"c",(function(){return v}));var n,o=i(3),s=i.n(o),a=i(0),r=i.n(a),l=i(10),c=i(12),u=i(7),h=i(15),p=!1,d="1:100万";function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){n||(n=new h.a),(p=!!t)?f(e,d):y(e);var i=Object(l.a)();i&&(p?f(e,d):y(i));var o=Object(c.a)().sdkD;o&&e!==o&&m(o,t)}}function f(e,t){d=t,p&&g(e);var i=Object(l.a)();return i&&p&&g(i),new Promise(function(){var e=s()(r.a.mark((function e(t,i){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){t()}),1e3);case 1:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}())}function v(){return p}function g(e){y(e);var t,i,n=e.viewer.camera.positionCartographic,o={position:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height}},s=e.viewer;switch(d){case"1:100万":o.position.alt=16e6;break;case"1:50万":o.position.alt=5e6;break;case"1:25万":o.position.alt=23e5;break;case"1:10万":o.position.alt=68e4;break;case"1:5万":o.position.alt=385e3;break;case"1:2.5万":o.position.alt=18e4;break;case"1:1万":o.position.alt=9e4;break;case"1:5000":o.position.alt=46e3}for(var a=0;au&&(u+=360),c={minLng:r,minLat:l,maxLng:u,maxLat:h},l<-88&&(l=-88),h>88&&(h=88),(c.maxLng-c.minLng)/n*((c.maxLat-c.minLat)/o)>7e3)c=null;else{for(var d=r;d<=u;d+=n){for(var f=[],v=[],g=l;Math.floor(1e9*g)/1e9<=h;g+=o/2)v.push([d,g]),f.push(Cesium.Cartesian3.fromDegrees(d,g,8848));88!=h&&h+o/2>=88&&f.push(Cesium.Cartesian3.fromDegrees(d,88,8848));var y=new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:f,width:1,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,arcType:Cesium.ArcType.RHUMB})});if(t.add(new Cesium.Primitive({geometryInstances:y,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromCssColorString("#fcfc00")})})})),dh)break;var w=p(C.lng,C.lat,e);i.add({position:Cesium.Cartesian3.fromDegrees(C.lng,C.lat,8848),text:w,font:"16px Inter, sans-serif",fillColor:Cesium.Color.fromCssColorString("#fcfc00"),pixelOffset:new Cesium.Cartesian2(0,0),showBackground:!1,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,scale:1,distanceDisplayCondition:new Cesium.DistanceDisplayCondition(0,8e7),scaleByDistance:s})}}for(var k=l;Math.floor(1e9*k)/1e9<=h;k+=o){for(var _=[],x=[],S=r;S<=u;S+=n/2)x.push([S,k]),_.push(Cesium.Cartesian3.fromDegrees(S,k,8848));var E=new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:_,width:1,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,arcType:Cesium.ArcType.RHUMB})});t.add(new Cesium.Primitive({geometryInstances:E,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromCssColorString("#fcfc00")})})}))}}}function p(e,t,i){var n,o;switch(i){case"1:100万":n=6,o=4;break;case"1:50万":n=3,o=2;break;case"1:25万":n=1.5,o=1;break;case"1:10万":n=.5,o=1/3;break;case"1:5万":n=.25,o=1/6;break;case"1:2.5万":n=.125,o=1/12;break;case"1:1万":n=.0625,o=1/24;break;case"1:5000":n=.03125,o=1/48}t=Math.max(-88,Math.min(88,t));var s,a=e,r=t=Math.abs(t),l=Math.floor(a/6+31),c="ABCDEFGHIJKLMNOPQRSTUV".charAt(Math.floor(r/4+1)-1),u={"1:100万":"","1:50万":"B","1:25万":"C","1:10万":"D","1:5万":"E","1:2.5万":"F","1:1万":"G","1:5000":"H"}[i];if(!u&&"1:100万"!==i)throw new Error("不支持的比例尺,请使用: 1:100万, 1:50万, 1:25万, 1:10万, 1:5万, 1:2.5万, 1:1万, 1:5000");s=c+l;var h=("000"+(Math.floor((4*Math.ceil(r/4)-r)/o)+1)).slice(-3),p=a-6*Math.floor(a/6),d=("000"+(Math.floor(p/n)+1)).slice(-3);switch(i){case"1:100万":return s;case"1:50万":case"1:25万":case"1:10万":case"1:5万":case"1:2.5万":case"1:1万":case"1:5000":break;default:throw new Error("不支持的比例尺")}return s+u+h+d}function m(){var e=s.camera.computeViewRectangle();if(2==s.scene.mode){var t=s.scene.canvas,i=new Cesium.Cartesian2(0,0),n=new Cesium.Cartesian2(t.clientWidth,t.clientHeight),o=s.scene.globe.ellipsoid,a=s.camera.pickEllipsoid(i,o),r=s.camera.pickEllipsoid(n,o);if(!a){var l=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,{x:0,y:0,z:6356755});i.y=l.y+5,a=s.camera.pickEllipsoid(i,o)}if(!r){var c=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,{x:0,y:0,z:-6356755});n.y=c.y-5,r=s.camera.pickEllipsoid(n,o)}var u=s.scene.globe.ellipsoid.cartesianToCartographic(a),h=s.scene.globe.ellipsoid.cartesianToCartographic(r);return e=(n.y-i.y)/(n.x-i.x)<=.49998752339363695?new Cesium.Rectangle(Cesium.Math.toRadians(-180),Cesium.Math.toRadians(-90),Cesium.Math.toRadians(180),Cesium.Math.toRadians(90)):new Cesium.Rectangle(u.longitude,h.latitude,h.longitude,u.latitude)}return e}t.postRenderEvent=function(){var i=e.viewer.camera.positionCartographic.height;switch(d){case"1:100万":o.position.alt=16e6;break;case"1:50万":o.position.alt=5e6;break;case"1:25万":o.position.alt=23e5;break;case"1:10万":o.position.alt=68e4;break;case"1:5万":o.position.alt=385e3;break;case"1:2.5万":o.position.alt=18e4;break;case"1:1万":o.position.alt=9e4;break;case"1:5000":o.position.alt=46e3}if(i>5*o.position.alt)return c=null,void t.removeAll();var n=!1,s=m(),a=Cesium.Math.toDegrees(s.west),r=Cesium.Math.toDegrees(s.south),u=Cesium.Math.toDegrees(s.east);a>u&&(u+=360),s={minLng:a,minLat:r,maxLng:u,maxLat:Cesium.Math.toDegrees(s.north)},c?(c.minLng>s.minLng||c.minLat>s.minLat||c.maxLng=50&&(h(d),n=!1):l=0},o.complete=function(){s.scene.postRender.addEventListener(t.postRenderEvent)},Object(u.i)(e,o,.5)}function y(e){for(var t,i,n=e.viewer,o=0;o=0;h--){var p=Array.from(n.keys())[h],d=n.get(p);if(d&&d.that)if("PolygonObject"===d.that.type){if(d.that.picking&&d.that.options.positions&&d.that.options.positions.length>=3){for(var m=turf.point([c.lng,c.lat]),f=[],v=0;v=3){for(var y=d.that.computeAssemble(d.that.options.positions,!0),b=turf.point([c.lng,c.lat]),C=[],w=0;w=3){for(var _=turf.point([c.lng,c.lat]),x=d.that.computeAttackArrow(d.that.options.positions),S=[],E=0;E=5){for(var D=turf.point([c.lng,c.lat]),M=d.that.computePincerArrow(d.that.options.positions),T=[],N=0;N=0;h--){var p=Array.from(n.keys())[h],d=n.get(p);if(d&&d.that)if("PolygonObject"===d.that.type){if(d.that.picking&&d.that.options.positions&&d.that.options.positions.length>=3){for(var m=turf.point([c.lng,c.lat]),f=[],v=0;v=3){for(var y=d.that.computeAssemble(d.that.options.positions,!0),b=turf.point([c.lng,c.lat]),C=[],w=0;w=3){for(var _=turf.point([c.lng,c.lat]),x=d.that.computeAttackArrow(d.that.options.positions),S=[],E=0;E=5){for(var D=turf.point([c.lng,c.lat]),M=d.that.computePincerArrow(d.that.options.positions),T=[],N=0;N\n
    \n
  • 属性
  • \n
\n ');var d=c.cartesian3Towgs84(i,e.viewer);(o=document.createElement("div")).id="custom-menu",o.style.position="absolute",o.style.width="110px",o.style.backgroundColor="#00000085",o.style.color="#ffffff",o.style.padding="6px 0",o.style.boxShadow="4px 4px 4px 0px rgba(0, 0, 0, 0.8)",o.innerHTML='\n
    \n
  • 绕鼠标点旋转
  • \n
\n
    \n
  • 文本框
  • \n
\n '.concat(u,"\n "),l.appendChild(o);var m=t.position.x,f=t.position.y;t.position.x+o.offsetWidth>l.offsetWidth&&(m=t.position.x-o.offsetWidth),t.position.y+o.offsetHeight>l.offsetHeight&&(f=t.position.y-o.offsetHeight),o.style.left=m+"px",o.style.top=f+"px",o.addEventListener("contextmenu",(function(e){e.preventDefault()}));for(var v=o.getElementsByTagName("li"),g={},y=function(t){v[t].addEventListener("mouseover",(function(){v[t].style.backgroundColor="#5e5e5e"})),v[t].addEventListener("mouseout",(function(){v[t].style.backgroundColor="unset"})),v[t].addEventListener("click",(function(){var i="";switch(v[t].innerHTML){case"绕鼠标点旋转":g.position=d,i="rotateAround";break;case"属性":s?(g.id=s,g.parentId=h.options.id):g.id=h.options.id,i="attribute";break;case"文本框":g.position=d,i="textBox"}a[e.div_id].callBack(i,g),l.removeChild(o)}))},b=0;be.length)&&(t=e.length);for(var i=0,n=Array(t);i.content .table .tr .th:nth-child(2), .fly-roam>.content .table .tr .td:nth-child(2) { - flex: 0 0 100px; - width: 100px; + flex: 0 0 180px; + width: 180px; } .fly-roam>.content .table .tr .th:last-child, diff --git a/src/renderer/src/icons/svg/video.svg b/src/renderer/src/icons/svg/video.svg new file mode 100644 index 0000000..d3d044a --- /dev/null +++ b/src/renderer/src/icons/svg/video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/renderer/src/views/components/propertyBox/FlyRoam.vue b/src/renderer/src/views/components/propertyBox/FlyRoam.vue index cbe5898..e2a2f48 100644 --- a/src/renderer/src/views/components/propertyBox/FlyRoam.vue +++ b/src/renderer/src/views/components/propertyBox/FlyRoam.vue @@ -3,7 +3,7 @@ ref="baseDialog" class="fly-roam" title="飞行漫游" - width="382px" + width="460px" left="180px" top="100px" :closeCallback="closeCallBack" @@ -197,6 +197,9 @@ + @@ -213,6 +216,7 @@ import { app } from 'electron' import { TreeApi } from '@/api/tree' import { useTreeNode } from '../tree/hooks/treeNode' import { ElMessage } from 'element-plus' +import { $sendElectronChanel } from '@/utils/communication' const { t } = useI18n() const { cusAddNodes } = useTreeNode() @@ -271,6 +275,24 @@ const draw = (data) => { } } +const startVideo = () => { + document.getElementById('earthContainer').style.zIndex = 100 + $sendElectronChanel('startRecoder') + ElMessage({ + message: '按ESC结束录制', + type: 'warning' + }) + + const handleKeyDown = (e) => { + if (e.key === 'Escape') { + $sendElectronChanel('endRecoder') + window.removeEventListener('keydown', handleKeyDown) + document.getElementById('earthContainer').style.zIndex = '' + } + } + window.addEventListener('keydown', handleKeyDown) +} + const clangeViewPointHeight = () => {} const viewPointHeightInput = () => { let dom: any = document.getElementById('viewPointHeight') @@ -321,6 +343,18 @@ defineExpose({ fill: rgba(241, 108, 85, 1) !important; } } +.video { + background: + linear-gradient( + 180deg, + rgba(71, 27, 5, 0.3) 0%, + rgba(71, 27, 5, 0.3) 0%, + rgba(255, 143, 87, 0) 100% + ), + rgba(0, 0, 0, 0.5) !important; + border: 1px solid rgba(255, 165, 92, 1) !important; + color: rgba(255, 165, 92, 1) !important; +} ::v-deep .content input.YJ-custom-checkbox[type='checkbox'] { border: 1px solid rgba(var(--color-base1), 1) !important; background-color: unset !important;