派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-30 a96e7a6704cb34ece8835066ff9f069014062e3d
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
49
50
51
/**
 * 固废
 */
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,
      LayerPopup: null
    })
    // AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/QueryStoragePlaceListByCompanyAndName', {
    // AjaxUtils.get4JsonDataByUrl('http://xearth.cn:3000/wasteSolid/getSolidWaste', {
    AjaxUtils.get4JsonDataByUrl('http://localhost:8888/static/SolidWaste.json', {
      companyId: 3900100145,
      userCode: 'wenchun.deng',
      name: '',
      marginWarr: '',
      longDayWarr: ''
    }, function (res) {
      const data = res.data.Result.DataInfo
      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) => {
    return '测试固废'
  }
 
  this.clickListener = (e) => {
    this.animalService.pulseEffect(e.latlng)
    console.log(e)
    console.log(this.PublicBounced)
    // return this.PublicBounced.$el
  }
  // 固废点击进行的 内容的设置
  // SetSolidWasteContent (config, containerPopup) {
  //   this.SolidWastePopup = containerPopup
  // }
}