1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| /**
| * 废气
| */
| const AnimalService = require('../service/AnimalService').default
| const AjaxUtils = require('../../../utils/AjaxUtils').default
|
| module.exports = function () {
| /**
| * 返回marker对象数组
| * @param L leaflet对象
| */
| this.init = (layer, L) => {
| this.animalService = new AnimalService({ L: L, layer: layer })
| AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', {
| companyId: 3900100145,
| id: '',
| monType: 1,
| userCode: 'wenchun.deng',
| monDuration: '',
| epName: '',
| secdDeptId: '',
| contrLevel: '',
| dataStatus: '',
| dataFlag: '',
| runStatus: '',
| emissTypeId: ''
| }, function (res) {
| const data = res.data.Result.DataInfo
| // console.log(data)
| for (let i = 0; i < data.length; i++) {
| // 经纬度 位置
| const positionX = data[i].Latitude
| const positionY = data[i].Longitude
| layer.addLayer(L.marker([positionX, positionY], {}))
| }
| })
| }
|
| this.bindTooltip = (layer) => {
| console.log(layer)
| return '测试废气'
| }
|
| this.clickListener = (e) => {
| console.log(e)
| this.animalService.pulseEffect(e.latlng)
| }
| }
|
|