派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-03-31 65113eae10994702a740a79e7461539d7bcbba08
src/components/LayerController/logic/Company.js
@@ -19,9 +19,10 @@
      layer: layer
    })
    const res = await mapApi.getCompany()
    console.log(res)
    // console.log(res)
    const data = res.Result.DataInfo || {}
    for (let i = 0; i < data.length; i++) {
      // console.log(data[i])
      // 经纬度 位置
      const positionX = data[i].Latitude
      const positionY = data[i].Longitude
@@ -32,7 +33,14 @@
          iconUrl: iconUrl,
          iconSize: [50, 50],
          iconAnchor: [25, 25]
        }),
        test: data[i]
        })
      marker.bindTooltip(data[i].name, {
        permanent: true,
        offset: [0, -16],
        direction: 'top',
        className: ''
      })
      layer.addLayer(marker)
@@ -40,20 +48,13 @@
  }
  this.bindTooltip = (layer) => {
    console.log(layer)
    return '企业'
    // console.log(layer)
    // return layer.options.test.name
  }
  this.clickListener = (layer) => {
    /* this.animalService.pulseEffect(e.latlng)
  this.clickListener = (e) => {
    // this.animalService.pulseEffect(e.latlng)
    console.log(e)
    return this.PublicBounced.$el
    */
    console.log(layer)
    // return this.PublicBounced.$el
  }
  // 固废点击进行的 内容的设置
  // SetSolidWasteContent (config, containerPopup) {
  //   this.SolidWastePopup = containerPopup
  // }
}