派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-04-01 d6bb6c4485ea9134caf48ef09424594e1a26b30c
src/components/LayerController/logic/WasteGas.js
@@ -18,10 +18,13 @@
   * @param L leaflet对象
   */
  this.init = async (layer, L) => {
    this.animalService = new AnimalService({ L: L, layer: layer })
    this.animalService = new AnimalService({
      L: L,
      layer: layer
    })
    const res = await mapApi.GetWasteGas()
    const data = res.Result.DataInfo || {}
    console.log(data)
    // console.log(data)
    for (let i = 0; i < data.length; i++) {
      // 经纬度 位置
      const positionX = data[i].Latitude
@@ -31,6 +34,7 @@
      var iconUrl = this.differentTypes(ContrLevel)
      const marker = L.marker.magic([positionX, positionY], {
        test: data[i],
        icon: L.icon({
          iconUrl: iconUrl,
          iconSize: [50, 50],
@@ -43,8 +47,7 @@
  }
  this.bindTooltip = (layer) => {
    console.log(layer)
    return '废气点'
    return layer.options.test.Name
  }
  this.clickListener = async (e) => {