File was renamed from src/components/BaseNav/WasteWater.js |
| | |
| | | import { requestWasteWater } from '@/api/request' |
| | | // 展示图片 |
| | | import defaultImg from '@components/BaseNav/magicMarker.png' |
| | | import Setting from '@components/BaseNav/voc.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 { |
| | |
| | | requestData () { |
| | | requestWasteWater().then(res => { |
| | | this.DrawTheWasteWaterContent(res.Result.DataInfo) |
| | | console.log(res) |
| | | // console.log(res) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | |
| | | const Icon = new WasteWaterIcon({ iconUrl: iconUrl }) |
| | | // let url = Icon.options.iconUrl |
| | | |
| | | const marker = this.L.marker([positionX, positionY], { icon: Icon }) |
| | | const marker = this.L.marker.magic([positionX, positionY], { icon: Icon, magic: 'vanishIn' }) |
| | | |
| | | marker.bindPopup(() => { |
| | | return this.WasteWaterPopup.$el |
| | | }, { |
| | | className: 's-map-popup', |
| | | minWidth: 600, |
| | | minWidth: 1000, |
| | | closeButton: true, |
| | | autoClose: false |
| | | }) |
| | |
| | | direction: 'top', |
| | | className: '' |
| | | }) |
| | | // 点击 事件 |
| | | // 点击事件 |
| | | marker.on('click', (e) => { |
| | | try { |
| | | // console.log(e) |
| | |
| | | } |
| | | } |
| | | |
| | | // 固废点击进行的 内容的设置 |
| | | // 废水按钮点击进行的 内容的设置 |
| | | SetWasteWaterContent (config, containerPopup) { |
| | | this.WasteWaterPopup = containerPopup |
| | | } |
| | |
| | | } : position |
| | | // 插件 效果实现 |
| | | const pulsingIcon = this.L.icon.pulse({ |
| | | iconSize: [20, 20], |
| | | iconSize: [20, 20], // 控制光圈大小 |
| | | color: differentColor, |
| | | fillColor: '' |
| | | fillColor: ' ' |
| | | }) |
| | | if (markers) { |
| | | // markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon })) |
| | |
| | | }, 1000) |
| | | } |
| | | |
| | | // 清除 图层 |
| | | // 在执行下个前清除已存在图层 |
| | | pulseClear (pulseinterver) { |
| | | clearInterval(pulseinterver) |
| | | pulseinterver = null |