(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-5e59"],{CuND:function(e,i,t){},Z380:function(e,i,t){"use strict";t.r(i);var o=t("omC7"),n=t.n(o),s=t("pckY"),a=t("1V/b"),r=t("KRny"),l=t("7feF"),c=t("UzrJ"),u={name:"App",components:{Map:s.a,Tab:a.a},data:function(){return{activeName:"first",loaded:!1,map:null,option:null,heatLayer:null,shineishiwai:!0,colorMapList:[],type:2}},mounted:function(){this.option={viewpoint:{y:31.254992,x:120.727592,z:289.24,heading:13.8,pitch:-37.3,roll:360},homeButton:!0,currentTime:"08:30:00",imageryProvider:new Cesium.WebMapTileServiceImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layer:"",style:"default",tileMatrixSetID:"w",format:"tiles",maximumLevel:18})},window.sss=this},methods:{init:function(e){this.loaded=!0,e.addModel({link:"http://222.92.213.22:8006/b3dm130/tileset.json",name:"130万吨模型图",modifyZ:-45,callback:function(e){var i=e.boundingSphere,t=Cesium.Cartographic.fromCartesian(i.center),o=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),n=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,102),s=Cesium.Cartesian3.subtract(n,o,new Cesium.Cartesian3);e.modelMatrix=Cesium.Matrix4.fromTranslation(s)}}),e.viewer.scene.globe.baseColor=Cesium.Color.fromCssColorString("#050F1F"),e.viewer.scene.logarithmicDepthBuffer=!1,e.viewer.scene.globe.enableLighting=!0,e.viewer.scene.sun.show=!1,e.viewer.scene.moon.show=!1,e.viewer.scene.fog.enabled=!1,e.viewer.scene.skyBox=null,this.initEvent(e),this.testLoadedData()},testLoadedData:function(){var e=this,i=r.c.map;if(i){var t={eType:2};Object(c.d)(t).then(function(t){e.colorMapList=JSON.parse(n()(t.data.result));var o=e.colorMapList.map(function(e){return{type:e.type,geometry:JSON.parse(e.geometry),properties:JSON.parse(e.properties)}}),s={type:"FeatureCollection",features:JSON.parse(n()(o))};i.loadGeoJSON(s)})}},testLoaded:function(){var e=this;if(r.c.map){var i={eType:2};Object(c.d)(i).then(function(i){e.colorMapList=JSON.parse(n()(i.data.result))})}},initEvent:function(e){var i=null,t=this;e.on("click",function(o){var n=o.position,s=o.cartesian3,a=(o.latLngPositionGlobe,o.latLngPosition,o.entity),r=o.attr;i&&(i.destroy(),i=null),a&&a.attribute&&a.attribute.type&&((i=new wutu3d.DivPoint(e.viewer,{html:"<div class='popup-wrapper'>"+r.name+"<br/><br/>XXXXXXXX</div>",position:s,anchor:[-170,-80]})).visible=!0),r.name&&"含内景大楼"===r.name&&(t.changeModel(!t.shineishiwai),t.shineishiwai=!t.shineishiwai);var c=Object(l.b)(n,e.viewer),u=Object(l.a)(c);console.log(u);var p=turf.point([Number(u.lng),Number(u.lat)]),m=turf.polygon([[[120.159277,30.227512],[120.158919,30.227569],[120.158777,30.227431],[120.158904,30.227151],[120.15911,30.227119],[120.159339,30.227347],[120.159277,30.227512]]]);turf.booleanPointInPolygon(p,m)&&u.alt>0&&u.alt<121.7&&(t.changeModel(!t.shineishiwai),t.shineishiwai=!t.shineishiwai)})},changeModel:function(e){if(console.log(e),e){r.c.map.models.map(function(e){"室内"===e.name?r.c.map.setModelVisible(e.id,!1):r.c.map.setModelVisible(e.id,!0)}),r.c.map.setViewpoint({y:30.231104,x:120.157372,z:298.45,heading:173,pitch:-28.8,roll:6.2},{duration:1.5});var i=r.c.map.viewer;i.scene.skyBox=null,i.scene.sun.show=!0,i.scene.moon.show=!0,i.scene.globe.show=!0,i.scene.logarithmicDepthBuffer=!0,i.scene.skyAtmosphere.show=!0,i.scene.backgroundColor=Cesium.Color.fromCssColorString("rgba(0,0,0, 1)")}else{r.c.map.models.map(function(e){"室内"===e.name?(r.c.map.setModelVisible(e.id,!0),r.c.map.flyToModel(e.id)):r.c.map.setModelVisible(e.id,!1)});var t=r.c.map.viewer;t.scene.skyBox=null,t.scene.sun.show=!1,t.scene.moon.show=!1,t.scene.globe.show=!1,t.scene.logarithmicDepthBuffer=!1,t.scene.skyAtmosphere.show=!1,t.scene.backgroundColor=Cesium.Color.fromCssColorString("rgba(0,0,0, 1)")}}}},p=(t("klYf"),t("ZrdR")),m=Object(p.a)(u,function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"map-layout"},[e.option?t("Map",{attrs:{option:e.option},on:{init:e.init}}):e._e(),e._v(" "),e.loaded?t("Tab",{attrs:{type:e.type,colorMapList:e.colorMapList},on:{getList:e.testLoaded}}):e._e()],1)},[],!1,null,"cdda8182",null);m.options.__file="index.vue";i.default=m.exports},klYf:function(e,i,t){"use strict";var o=t("CuND");t.n(o).a}}]);
|