| | |
| | | import { map, object3Dlayer } from './index_old'; |
| | | import calculate from './calculate'; |
| | | import imgLocation from '@/assets/mipmap/location.png'; |
| | | |
| | | var _defaultDeg = 30, |
| | | _sector = undefined, |
| | | _sectorViews = {}; |
| | | |
| | | function clearSector() { |
| | | var list = []; |
| | | for (const key in _sectorViews) { |
| | | list.push(_sectorViews[key]); |
| | | } |
| | | if (list.length > 0) { |
| | | map.remove(list); |
| | | _sectorViews = {}; |
| | | } |
| | | if (_sector) { |
| | | object3Dlayer.remove(_sector); |
| | | } |
| | | } |
| | | |
| | | export default { |
| | | clearSector() { |
| | | var list = []; |
| | | for (const key in _sectorViews) { |
| | | list.push(_sectorViews[key]); |
| | | } |
| | | if (list.length > 0) { |
| | | map.remove(list); |
| | | _sectorViews = {}; |
| | | } |
| | | if (_sector) { |
| | | object3Dlayer.remove(_sector); |
| | | } |
| | | }, |
| | | drawSector(fDatas, i) { |
| | | const lnglat = fDatas.lnglats_GD[i]; |
| | | let windDir = fDatas.factor[17].datas[i].factorData; |
| | |
| | | return; |
| | | } |
| | | if (_sector != undefined) { |
| | | clearSector(); |
| | | this.clearSector(); |
| | | } |
| | | |
| | | // eslint-disable-next-line no-undef |
| | |
| | | styles: [ |
| | | { |
| | | icon: { |
| | | img: './asset/mipmap/location.png', |
| | | img: imgLocation, |
| | | size: [16, 16], //可见区域的大小 |
| | | ancher: [8, 16], //锚点 |
| | | fitZoom: 18, //最合适的级别 |
| | |
| | | styles: [ |
| | | { |
| | | icon: { |
| | | img: './asset/mipmap/location.png', |
| | | img: imgLocation, |
| | | size: [16, 16], //可见区域的大小 |
| | | ancher: [8, 16], //锚点 |
| | | fitZoom: 18, //最合适的级别 |
| | |
| | | styles: [ |
| | | { |
| | | icon: { |
| | | img: './asset/mipmap/location.png', |
| | | img: imgLocation, |
| | | size: [16, 16], //可见区域的大小 |
| | | ancher: [8, 16], //锚点 |
| | | fitZoom: 18, //最合适的级别 |
| | |
| | | styles: [ |
| | | { |
| | | icon: { |
| | | img: './asset/mipmap/location.png', |
| | | img: imgLocation, |
| | | size: [16, 16], //可见区域的大小 |
| | | ancher: [8, 16], //锚点 |
| | | fitZoom: 18, //最合适的级别 |