| | |
| | | import { useCloned } from '@vueuse/core'; |
| | | |
| | | export class SatelliteProxy { |
| | | constructor(name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | // 地图网格相关对象 |
| | | mapViews; |
| | | |
| | | mapViewsList = []; |
| | | |
| | | mapViewsMap = new Map(); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // |
| | | drawGrids({ |
| | | gridDataDetailList, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | if (this.mapViewsList.length < gridDataDetailList.length) { |
| | | let index = this.mapViewsList.length; |
| | | while (index < gridDataDetailList.length) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | this.mapViewsList.push(newMapViews); |
| | | } |
| | | } |
| | | |
| | | this.mapViewsList.forEach((m, i) => { |
| | | this.drawGrid({ |
| | | gridDataDetail: gridDataDetailList[i], |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: m |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | drawNewGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | this.mapViewsList.push(newMapViews); |
| | | this.drawGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: newMapViews |
| | | }); |
| | | } |
| | | drawTagGrid({ |
| | | tag, |
| | | gridDataDetail, |
| | |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | showRankTxt, |
| | | extData |
| | | }) { |
| | | if (!this.mapViewsMap.has(tag)) { |
| | | const newMapViews = { |
| | |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)), |
| | | extData: extData |
| | | }; |
| | | this.mapViewsMap.set(tag, newMapViews); |
| | | } |