派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-04-02 10a3e088c10e4e1e935a47721b517f07bf30a309
src/components/LayerController/logic/WasteGas.js
@@ -21,7 +21,7 @@
    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
@@ -44,7 +44,6 @@
  }
  this.bindTooltip = (layer) => {
    console.log(layer)
    return layer.options.test.Name
  }
@@ -57,9 +56,11 @@
    // const result = await mapApi.getWasteGas(dataValue)
    const PublicBounced = window.Vue.extend(publicBounced)
    const instance = new PublicBounced()
    instance.setData(e.layer.options.test)
    instance.setGasData(e.layer.options.test, 'feiqi')
    // console.log(e.layer.options.test)
    instance.$mount()
    document.body.appendChild(instance.$el)
    this.setPanTo(e.latlng, 240)
  }
  // 不同类型图片加载
  this.differentTypes = (ContrLevel) => {
@@ -75,4 +76,11 @@
    }
    return effectOfChange
  }
  this.setPanTo = (pos, value) => {
    var position = pos
    position = window.map.latLngToLayerPoint(position)
    position.y += value
    position = window.map.layerPointToLatLng(position)
    window.map.flyTo(position)
  }
}