| | |
| | | // 请求数据 |
| | | import { requestWasteWater } from '@/api/request' |
| | | // 展示图片 |
| | | import defaultImg from '@assets/images/map-pages/basenav/Waste-water/fs_green.png' |
| | | import Setting from '@assets/images/map-pages/basenav/Waste-water/fs_yellow.png' |
| | | // import defaultImg from '@assets/images/map-pages/basenav/Waste-water/fs_green.png' |
| | | // import Setting from '@assets/images/map-pages/basenav/Waste-water/fs_yellow.png' |
| | | |
| | | // 底图业务展示点 |
| | | class AddWasteWaterHelper { |
| | |
| | | DrawWasteWaterContent (data) { |
| | | // 图标样式扩展 |
| | | const WasteWaterIcon = this.WasteWaterIcon() |
| | | |
| | | // //加载数据前如果存在图层组 那么清除掉 |
| | | if (this.WasteWaterLayerGroup) { |
| | | this.WasteWaterLayerGroup.clearLayers() |
| | |
| | | const Icon = new WasteWaterIcon({ iconUrl: iconUrl }) |
| | | // let url = Icon.options.iconUrl |
| | | |
| | | const marker = this.L.marker.magic([positionX, positionY], { icon: Icon, magic: 'vanishIn' }) |
| | | // const marker = this.L.marker.magic([positionX, positionY], { icon: Icon, magic: 'vanishIn' }) // 带显示动画 |
| | | const marker = this.L.marker([positionX, positionY], { icon: Icon }) |
| | | |
| | | marker.bindPopup(() => { |
| | | return this.WasteWaterPopup.$el |
| | | }, { |
| | | className: 's-map-popup', |
| | | minWidth: 1000, |
| | | closeButton: true, |
| | | autoClose: false |
| | | }) |
| | | // marker.bindPopup(() => { |
| | | // return this.WasteWaterPopup.$el |
| | | // }, { |
| | | // className: 's-map-popup', |
| | | // minWidth: 1000, |
| | | // closeButton: true, |
| | | // autoClose: false |
| | | // }) |
| | | // 划过出现 展示数据 |
| | | marker.bindTooltip(data[i].Name, { |
| | | permanent: true, |
| | |
| | | try { |
| | | // console.log(e) |
| | | this.EffectOfPulse(e.target.getLatLng()) |
| | | this.WasteWaterPopup.setDate(data[i]) |
| | | this.WasteWaterPopup.setData(data[i]) |
| | | return this.WasteWaterPopup.$el |
| | | } catch (error) { |
| | | console.log(error) |
| | |
| | | WasteWaterIconUrl (determineValueOne, determineValueTwo, position) { |
| | | let EffectOfChange |
| | | if (determineValueOne === 1 || determineValueTwo === 1) { |
| | | EffectOfChange = defaultImg |
| | | // EffectOfChange = defaultImg |
| | | this.EffectOfPulse(position, this.WasteWaterMarkersLabels, this.WasteWaterLayerGroup) |
| | | } else { |
| | | EffectOfChange = Setting |
| | | // EffectOfChange = Setting |
| | | } |
| | | return EffectOfChange |
| | | } |