supermap-2.5d.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <template>
  2. <div id="cesiumContainer" style="width: 100%; height: 100%;background: none;">
  3. <!--地图top 显示 开始-->
  4. <transition name='fade'>
  5. <div class="map-tit" v-show="mapshow">
  6. <div class="top-tit">
  7. <i class="iconfont sj-icon-jkzx"></i>
  8. <span><img src="../assets/images/close.svg" @click="mapShow" /></span>
  9. </div>
  10. <div class="map-txt" v-html="bindPopupHtml">
  11. </div>
  12. <div id="super2" />
  13. </div>
  14. </transition>
  15. <!--地图top 显示 结束-->
  16. </div>
  17. </template>
  18. <script>
  19. import {
  20. iconList,
  21. getDeviceList
  22. } from '@/api/components/supermap.js'
  23. import Cookies from 'js-cookie'
  24. import {
  25. getConfigKey
  26. } from "@/api/system/config";
  27. export default {
  28. name: 'supermap-2.5d',
  29. data() {
  30. return {
  31. bindPopupHtml: null,
  32. mapshow: false,
  33. superMapRootUrl: null,
  34. viewer: null,
  35. scene: null,
  36. handler: null,
  37. pick: null,
  38. back_position: null,
  39. content: null,
  40. mvtMap0: null,
  41. shuixi_name: null,
  42. mvtMap1: null,
  43. mvtMap2: null,
  44. mvtMap3: null,
  45. road_name: null,
  46. layer_xiangzhenjie_name: null,
  47. markerboxEntity: [], //地图落点实体
  48. markerboxEntityRadius: [], //地图落点实体
  49. connectBoxEntity: null, //地图线实体
  50. graphicsBoxEntity: null, //地图面实体
  51. connectBoxEntityTwo: null, //地图线实体
  52. timer: null,
  53. /*************************原地图属性*********************/
  54. isEditableLayers: false, //绘图控件
  55. selOptV: 2, // 贴地量算
  56. clampMode: 1, // 空间模式
  57. handlerDis: null, // 距离
  58. handlerArea: null, // 面积
  59. /*************************原地图属性*********************/
  60. aac: null,
  61. queryParams: {
  62. name: null,
  63. mapData: null,
  64. mapName: null
  65. },
  66. showLayer:null
  67. }
  68. },
  69. watch: {},
  70. created() {
  71. this.superMapInfo();
  72. },
  73. mounted() {
  74. this.showLayer = this.showLayer != undefined ? this.showLayer:false;
  75. },
  76. props: {
  77. showLayer: [Boolean],
  78. },
  79. methods: {
  80. choseMeasuringAreaAll() {
  81. if (this.handlerDis != null) {
  82. this.handlerDis.clear()
  83. }
  84. if (this.handlerArea != null) {
  85. this.handlerArea.clear()
  86. }
  87. },
  88. // 测量距离
  89. choseMeasuringDistance() {
  90. let that = this
  91. if (that.handlerDis != null) {
  92. that.handlerDis.deactivate()
  93. that.handlerDis.clear()
  94. }
  95. //初始化测量距离
  96. that.handlerDis = new Cesium.MeasureHandler(that.viewer, Cesium.MeasureMode.Distance, that.clampMode);
  97. that.handlerDis.clampMode = 1;
  98. //注册测距功能事件
  99. that.handlerDis.measureEvt.addEventListener(function(result) {
  100. var dis = Number(result.distance);
  101. var selOptV = that.selOptV;
  102. if (selOptV == 3 || selOptV == 4) {
  103. dis = Number(calcClampDistance(positions));
  104. };
  105. var distance = dis > 1000 ? (dis / 1000).toFixed(2) + 'km' : dis.toFixed(2) + 'm';
  106. that.handlerDis.disLabel.text = '距离:' + distance;
  107. });
  108. that.handlerDis.activeEvt.addEventListener(function(isActive) {
  109. if (isActive == true) {
  110. that.viewer.enableCursorStyle = false;
  111. that.viewer._element.style.cursor = '';
  112. $('#super2').removeClass('measureCur').addClass('measureCur');
  113. that.viewer.scene.pickPointEnabled = false;
  114. } else {
  115. that.viewer.enableCursorStyle = true;
  116. $('#super2').removeClass('measureCur');
  117. that.viewer.scene.pickPointEnabled = false;
  118. }
  119. });
  120. that.handlerDis.activate();
  121. },
  122. // 测量面积
  123. choseMeasuringArea() {
  124. let that = this
  125. if (that.handlerArea != null) {
  126. // that.handlerArea.deactivate()
  127. that.handlerArea.clear()
  128. }
  129. //初始化测量面积
  130. that.handlerArea = new Cesium.MeasureHandler(that.viewer, Cesium.MeasureMode.Area, that.clampMode);
  131. that.handlerArea.clampMode = 1;
  132. that.handlerArea.measureEvt.addEventListener(function(result) {
  133. var mj = Number(result.area);
  134. var area = mj > 1000000 ? (mj / 1000000).toFixed(2) + 'km²' : mj.toFixed(2) + '㎡'
  135. that.handlerArea.areaLabel.text = '面积:' + area;
  136. });
  137. that.handlerArea.activeEvt.addEventListener(function(isActive) {
  138. if (isActive == true) {
  139. that.viewer.enableCursorStyle = false;
  140. that.viewer._element.style.cursor = '';
  141. $('#super2').removeClass('measureCur').addClass('measureCur');
  142. that.viewer.scene.pickPointEnabled = false;
  143. } else {
  144. that.viewer.enableCursorStyle = true;
  145. that.viewer._element.style.cursor = '';
  146. $('#super2').removeClass('measureCur');
  147. that.viewer.scene.pickPointEnabled = false;
  148. }
  149. });
  150. that.handlerArea.activate();
  151. },
  152. mapShow() {
  153. this.mapshow = false,
  154. clearInterval(this.timer)
  155. },
  156. //清除所有
  157. clearAll() {
  158. this.viewer.entities.removeAll()
  159. },
  160. //移除之前添加的点
  161. clearM() {
  162. if (this.markerboxEntity != null && this.markerboxEntity.length > 0) {
  163. for (let i = 0; i < this.markerboxEntity.length; i++) {
  164. this.viewer.entities.remove(this.markerboxEntity[i])
  165. }
  166. this.markerboxEntity = []
  167. }
  168. },
  169. //移除之前添加的点
  170. clearMRadius() {
  171. if (this.markerboxEntityRadius != null && this.markerboxEntityRadius.length > 0) {
  172. for (let i = 0; i < this.markerboxEntityRadius.length; i++) {
  173. this.viewer.entities.remove(this.markerboxEntityRadius[i])
  174. }
  175. this.markerboxEntityRadius = []
  176. }
  177. },
  178. //移除之前添加的线
  179. clearC() {
  180. if (this.connectBoxEntity != null) {
  181. this.viewer.entities.remove(this.connectBoxEntity)
  182. this.connectBoxEntity = null
  183. }
  184. },
  185. //移除之前添加的线
  186. clearTwoC() {
  187. if (this.connectBoxEntityTwo != null) {
  188. this.viewer.entities.remove(this.connectBoxEntityTwo)
  189. this.connectBoxEntityTwo = null
  190. }
  191. },
  192. //移除之前添加的面
  193. clearG() {
  194. if (this.graphicsBoxEntity != null) {
  195. this.viewer.entities.remove(this.graphicsBoxEntity)
  196. this.graphicsBoxEntity = null
  197. }
  198. },
  199. superMapInfo() {
  200. getConfigKey('superMap.iServer').then(response => {
  201. this.superMapRootUrl = response.msg;
  202. this.onload();
  203. })
  204. },
  205. onload() {
  206. let that = this;
  207. //1.添加地形数据
  208. that.viewer = new Cesium.Viewer('cesiumContainer', {
  209. //创建地形服务提供者的实例,url为SuperMap iServer发布的TIN地形服务
  210. terrainProvider: new Cesium.CesiumTerrainProvider({
  211. url: that.superMapRootUrl + "/3D-sipingchangjing/rest/realspace/datas/dem@spyx4326",
  212. //isSct : false,//地形服务源自SuperMap iServer发布时需设置isSct为true
  213. invisibility: true
  214. }),
  215. infoBox: false,
  216. navigation: false
  217. }, {
  218. contextOptions: {
  219. msaaLevel: 4,
  220. requestWebgl2: true
  221. },
  222. orderIndependentTranslucency: false
  223. });
  224. that.scene = that.viewer.scene;
  225. that.viewer.cesiumWidget.creditContainer.style.display = "none" // 去掉超图logo水印
  226. //2.添加SuperMap iServer发布的影像服务
  227. let layer = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
  228. url: that.superMapRootUrl + "/3D-sipingchangjing/rest/realspace/datas/siping_2m@spyx4326",
  229. }));
  230. //飞行值坐标点,每3秒推进一级
  231. //heading-代表镜头左右方向,正值为右,负值为左
  232. //pitch-代表镜头上下方向,正值为上,负值为下.
  233. //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
  234. setTimeout(function() {
  235. that.viewer.camera.flyTo({
  236. destination: Cesium.Cartesian3.fromDegrees(124.49980650138238, 43.428263986216815, 950000),
  237. orientation: {
  238. // heading : Cesium.Math.toRadians(346.4202942851978),
  239. // pitch : Cesium.Math.toRadians(-56.74026687972041),
  240. // roll : Cesium.Math.toRadians(0)
  241. }
  242. });
  243. }, 3000);
  244. setTimeout(function() {
  245. that.viewer.camera.flyTo({
  246. destination: Cesium.Cartesian3.fromDegrees(124.49980650138238, 43.428263986216815, 650000),
  247. orientation: {
  248. // heading : Cesium.Math.toRadians(346.4202942851978),
  249. // pitch : Cesium.Math.toRadians(-56.74026687972041),
  250. // roll : Cesium.Math.toRadians(0)
  251. }
  252. });
  253. }, 3000);
  254. setTimeout(function() {
  255. that.viewer.camera.flyTo({
  256. destination: Cesium.Cartesian3.fromDegrees(124.49980650138238, 43.428263986216815, 350000),
  257. orientation: {
  258. // heading : Cesium.Math.toRadians(346.4202942851978),
  259. // pitch : Cesium.Math.toRadians(-56.74026687972041),
  260. // roll : Cesium.Math.toRadians(0)
  261. }
  262. });
  263. }, 3000);
  264. //开始加载专题图等数据,8秒后开始执行
  265. setTimeout(function() {
  266. // 3.水系
  267. // let shuixi = that.superMapRootUrl+"/map-mvt-shuixiMian/restjsr/v1/vectortile/maps/shuixi_Mian";
  268. // that.mvtMap0 = that.scene.addVectorTilesMap({
  269. // url: shuixi,
  270. // canvasWidth: 512,
  271. // name: 'mvt_map0',
  272. // viewer: that.viewer,
  273. // selectedColor:new Cesium.Color(6,169,254,0.5),
  274. // show:true,
  275. // });
  276. // //4.林地
  277. // let lindi = that.superMapRootUrl+"/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi";
  278. // that.mvtMap1 = that.scene.addVectorTilesMap({
  279. // url: lindi,
  280. // canvasWidth: 512,
  281. // name: 'mvt_map1',
  282. // viewer: that.viewer,
  283. // selectedColor:new Cesium.Color(6,254,181,0.5),
  284. // show:true,
  285. // });
  286. //
  287. //5.农田
  288. if(that.showLayer){
  289. let nongtian = that.superMapRootUrl + "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian";
  290. that.mvtMap2 = that.scene.addVectorTilesMap({
  291. url: nongtian,
  292. canvasWidth: 512,
  293. name: 'mvt_map2',
  294. viewer: that.viewer,
  295. selectedColor: new Cesium.Color(250, 236, 246, 1.0),
  296. show: true,
  297. });
  298. }
  299. //
  300. // //6.路网
  301. // let road = that.superMapRootUrl+"/map-mvt-roadXian/restjsr/v1/vectortile/maps/road_Xian";
  302. // that.mvtMap3 = that.scene.addVectorTilesMap({
  303. // url: road,
  304. // canvasWidth: 512,
  305. // name: 'mvt_map3',
  306. // viewer: that.viewer,
  307. // show:true,
  308. // });
  309. //
  310. // //7.添加路网NAME
  311. // let road_name_url = that.superMapRootUrl+'/3D-road_Name_S/rest/realspace';
  312. // that.road_name = that.scene.open(road_name_url);
  313. //
  314. // // 8.添加水系NAME
  315. // let shuixi_name_url = that.superMapRootUrl + '/3D-shuixi_Name/rest/realspace';
  316. // that.shuixi_name = that.scene.open(shuixi_name_url);
  317. //9.添加县界和乡镇界
  318. let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
  319. url: that.superMapRootUrl + "/map-SIPING/rest/maps/XianJie_XiangZhenJie",
  320. }));
  321. //10.添加区县乡镇村名称
  322. let layer_xiangzhenjie_name = that.superMapRootUrl + '/3D-Name_he/rest/realspace';
  323. that.scene.open(layer_xiangzhenjie_name);
  324. // that.road_name.then(function(layers) {
  325. // let xianJie_textLayer = that.scene.layers.find('XianJie@SiPing#1'); //区县文字图层
  326. // let xiangZhenJie_textLayer = that.scene.layers.find('XiangZhenJie@SiPing#2'); //乡镇文字图层
  327. // let cun_textLayer = that.scene.layers.find('Cun@SiPing#1'); //村文字图层
  328. // //关闭避让
  329. // xianJie_textLayer.isOverlapDisplayed = true;
  330. // xiangZhenJie_textLayer.isOverlapDisplayed = true;
  331. // cun_textLayer.isOverlapDisplayed = true;
  332. // });
  333. }, 3000);
  334. that.viewer.selectedEntityChanged.addEventListener(function (entity) {
  335. if(entity != undefined && Reflect.has(entity,'layerID')){
  336. that.queryParams.name = entity.pickResult[entity.layerID][0].feature.properties.Name;
  337. that.queryParams.mapData = entity.pickResult[entity.layerID][0].feature.properties.SmUserID;
  338. that.queryParams.mapName = entity.pickResult[entity.layerID][0].feature.properties.layer;
  339. getDeviceList(that.queryParams).then(res => {
  340. const treeLabels = [{
  341. "id": null,
  342. "labelCode": "999",
  343. "labelName": "电视墙",
  344. "cameraType": null,
  345. "parentLabelCode": ""
  346. }];
  347. const labelChannels = [];
  348. for (let i in res.data){
  349. treeLabels.push({
  350. "id": null,
  351. "labelCode": res.data[i].cameraCode,
  352. "labelName": res.data[i].cameraName,
  353. "cameraType": "1",
  354. "parentLabelCode": "999"
  355. })
  356. labelChannels.push({
  357. "labelCode": res.data[i].cameraCode,
  358. "channelDates": [
  359. {
  360. "channelCode": res.data[i].cameraCode,
  361. "channelName": res.data[i].cameraName,
  362. "channelSn": null,
  363. "cameraType": "1",
  364. "online": "1",
  365. "cameraCode": "1"
  366. }
  367. ]
  368. })
  369. }
  370. const dianshiqiang = [
  371. {
  372. "switchTab": "2",
  373. "treeLabels": treeLabels,
  374. "labelChannels": labelChannels
  375. }
  376. ]
  377. that.$emit('fatherMethod', dianshiqiang,res.data[0].longitude,res.data[0].latitude,res.data[0].userList);
  378. });
  379. }
  380. });
  381. },
  382. /**
  383. * 地图落点
  384. */
  385. setMarkers(makerList) {
  386. let that = this
  387. that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
  388. clearInterval(that.aac)
  389. for (let i in makerList) {
  390. let longitude = makerList[i].lng
  391. let latitude = makerList[i].lat
  392. let marker = that.viewer.entities.add({
  393. name: '',
  394. position: Cesium.Cartesian3.fromDegrees(longitude, latitude),
  395. billboard: {
  396. image: iconList[makerList[i].icon],
  397. width: 48,
  398. height: 48,
  399. heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  400. disableDepthTestDistance: Number.POSITIVE_INFINITY
  401. },
  402. description: makerList[i].bindPopupHtml,
  403. click: makerList[i].click,
  404. parameter: makerList[i].parameter
  405. })
  406. that.markerboxEntity.push(marker)
  407. }
  408. that.viewer.scene.globe.depthTestAgainstTerrain = false
  409. that.createLeftClickDescription()
  410. that.createRightClickDescription()
  411. },
  412. /**
  413. *鼠标左击事件是原来的气泡
  414. */
  415. createLeftClickDescription() {
  416. let that = this;
  417. that.handler.setInputAction(function(movement) {
  418. that.pick = that.viewer.scene.pick(movement.position);
  419. if (that.pick && that.pick) {
  420. let id = Cesium.defaultValue(that.viewer.scene.pick(movement.position).id, that.viewer.scene.pick(
  421. movement.position).primitive.id);
  422. let html = id._description;
  423. clearInterval(that.timer)
  424. if (html != undefined && html._value != null && html._value != '' && html != 'cgq') {
  425. that.bindPopupHtml = html
  426. that.mapshow = true
  427. } else if (html == 'cgq') {
  428. that.timer = setInterval(function() {
  429. var color = "green";
  430. var value = Math.random();
  431. var up = "▲";
  432. var down = "▼";
  433. if (value > 0.5) {
  434. color = "red";
  435. value = value + "" + up;
  436. } else {
  437. value = value + "" + down;
  438. }
  439. that.bindPopupHtml = "<span style='color:" + color + "'>当前传感器数值: " + value + "</span>";
  440. }, 1000)
  441. that.mapshow = true
  442. } else {
  443. that.mapshow = false
  444. clearInterval(that.timer)
  445. }
  446. } else {
  447. that.mapshow = false
  448. clearInterval(that.timer)
  449. }
  450. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  451. },
  452. /**
  453. *鼠标右击事件是原来的点击
  454. */
  455. createRightClickDescription() {
  456. let that = this;
  457. that.handler.setInputAction(function(movement) {
  458. that.mapshow = false
  459. clearInterval(that.timer)
  460. // 监听鼠标的当前位置坐标,然后根据当前坐标去动态更新气泡窗口div的显示位置;
  461. that.pick = that.viewer.scene.pick(movement.position);
  462. if (that.pick && that.pick) {
  463. let id = Cesium.defaultValue(that.viewer.scene.pick(movement.position).id, that.viewer.scene.pick(
  464. movement.position).primitive.id);
  465. let clickName = id._click;
  466. that.$emit(clickName, id._parameter)
  467. }
  468. }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
  469. },
  470. /**
  471. * 落点定位
  472. */
  473. dropLocation(lat, lng) {
  474. this.viewer.camera.flyTo({
  475. destination: Cesium.Cartesian3.fromDegrees(lng, lat, 3000),
  476. });
  477. },
  478. /**
  479. * 地图画线(贴地)
  480. */
  481. setConnectList(connectList, color, withAlpha) {
  482. let that = this
  483. //Cesium.Color.fromCssColorString('#67ADDF') 16进制颜色设置
  484. let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
  485. that.connectBoxEntity = that.viewer.entities.add({
  486. Type: 'Polyline',
  487. polyline: {
  488. positions: Cesium.Cartesian3.fromDegreesArray(connectList),
  489. clampToGround: true, //贴地 true,不贴地 false
  490. width: 5,
  491. material: material
  492. }
  493. })
  494. },
  495. /**
  496. * 地图落点-覆盖范围
  497. */
  498. setMarkersRadius(makerList) {
  499. let that = this
  500. that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
  501. for (let i in makerList) {
  502. let longitude = makerList[i].lng;
  503. let latitude = makerList[i].lat;
  504. let marker = that.viewer.entities.add({
  505. name: "",
  506. position: Cesium.Cartesian3.fromDegrees(longitude, latitude),
  507. billboard: {
  508. image: iconList[makerList[i].icon],
  509. width: 48,
  510. height: 48,
  511. heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  512. disableDepthTestDistance: Number.POSITIVE_INFINITY
  513. },
  514. description: makerList[i].bindPopupHtml,
  515. click: makerList[i].click,
  516. parameter: makerList[i].parameter
  517. })
  518. that.markerboxEntityRadius.push(marker)
  519. //绘制摄像头的圈(覆盖范围)
  520. let markerRadius = that.viewer.entities.add({
  521. position: Cesium.Cartesian3.fromDegrees(makerList[i].lng, makerList[i].lat, 2),
  522. ellipse: {
  523. semiMinorAxis: makerList[i].radius,
  524. semiMajorAxis: makerList[i].radius,
  525. height: 0.0,
  526. material: Cesium.Color.DODGERBLUE.withAlpha(0.4),
  527. outline: true,
  528. outlineColor: Cesium.Color.DEEPSKYBLUE.withAlpha(1),
  529. outlineWidth: 1,
  530. },
  531. });
  532. that.markerboxEntityRadius.push(markerRadius)
  533. }
  534. that.viewer.scene.globe.depthTestAgainstTerrain = false
  535. that.createLeftClickDescription()
  536. that.createRightClickDescription()
  537. },
  538. /**
  539. * 地图画线(贴地)
  540. */
  541. setConnectTwoList(connectList, color, withAlpha) {
  542. let that = this
  543. //Cesium.Color.fromCssColorString('#67ADDF') 16进制颜色设置
  544. let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
  545. that.connectBoxEntityTwo = that.viewer.entities.add({
  546. Type: 'Polyline',
  547. polyline: {
  548. positions: Cesium.Cartesian3.fromDegreesArray(connectList),
  549. clampToGround: true, //贴地 true,不贴地 false
  550. width: 5,
  551. material: material
  552. }
  553. })
  554. },
  555. /**
  556. * 地图图形(贴地)
  557. */
  558. setGraphicsList(graphicsList, color, withAlpha) {
  559. let that = this
  560. //Cesium.Color.fromCssColorString('#67ADDF') 16进制颜色设置
  561. let material = Cesium.Color.fromCssColorString(color).withAlpha(withAlpha);
  562. that.graphicsBoxEntity = that.viewer.entities.add({
  563. polygon: {
  564. hierarchy: Cesium.Cartesian3.fromDegreesArray(graphicsList),
  565. clampToGround: true, //贴地 true,不贴地 false
  566. width: 5,
  567. material: material
  568. }
  569. })
  570. }
  571. },
  572. }
  573. </script>
  574. <style rel="stylesheet/scss" lang="scss" scoped>
  575. .map-tit {
  576. position: absolute;
  577. top: 90px;
  578. left: 50%;
  579. transform: translatex(-50%);
  580. border: 1px solid #15519b;
  581. z-index: 9999;
  582. background: linear-gradient(rgba(4, 23, 62, 0.6), rgba(0, 28, 70, 0.6));
  583. min-width: 300px;
  584. .top-tit {
  585. width: 100%;
  586. height: 28px;
  587. line-height: 28px;
  588. display: flex;
  589. flex-direction: row;
  590. justify-content: space-between;
  591. background: #15519b80;
  592. padding: 0px 10px;
  593. align-items: center;
  594. i {
  595. color: #10ccff;
  596. font-size: 18px;
  597. text-shadow: 0px 0px 5px #23b3b3;
  598. ;
  599. }
  600. span img {
  601. display: block;
  602. width: 12px;
  603. height: 12px;
  604. color: #fff;
  605. cursor: pointer;
  606. }
  607. }
  608. .map-txt {
  609. padding: 10px 15px;
  610. color: #fff;
  611. line-height: 20px;
  612. font-size: 12px;
  613. .d-l-con {}
  614. }
  615. }
  616. .fade-enter-active,
  617. .fade-leave-active {
  618. transition: 1s;
  619. }
  620. .fade-enter,
  621. .fade-leave-to {
  622. opacity: 0;
  623. transform: translateY(-10rem);
  624. }
  625. </style>