派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-04-09 b1f1538f433486783db4a042d8f9ba540892e320
src/components/LayerController/service/WfsLayerService.js
@@ -1,7 +1,6 @@
/**
 * 加载业务数据图层
 */
import { STYLES } from '../../../conf/Constants'
import AjaxUtils from '../../../utils/AjaxUtils'
@@ -30,14 +29,13 @@
  loadData (wfsUrl) {
    AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => {
      console.log(res)
      this.draw(res.data.features)
    })
  }
  draw (features) {
    const icon = this.config.icon
    this.L.geoJSON(features, {
    const geojsonLayer = this.L.geoJSON(features, {
      style: function (feature) {
        return {
          fill: STYLES.FILL,
@@ -75,6 +73,7 @@
          .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer))
      }
    }).addTo(this.layer)
    window.layerFactory.setZIndex(geojsonLayer)
  }
  mouseOverListener (e, layer) {