派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-04-20 704714d2bbb1cf97cb16d452332c4334bc78a24c
src/components/LayerController/service/WfsLayerService.js
@@ -3,6 +3,7 @@
 */
import { STYLES } from '../../../conf/Constants'
import AjaxUtils from '../../../utils/AjaxUtils'
import { setZIndex } from '../../../utils/utils'
class WfsLayerService {
  constructor (config) {
@@ -10,8 +11,8 @@
    this.params = {
      version: '1.0.0',
      REQUEST: 'getfeature',
      OUTPUTFORMAT: 'json',
      maxFeatures: 20000
      OUTPUTFORMAT: 'json'
      // maxFeatures: 20000
    }
    this.popupComp = window.popupComp
    this.L = window.L
@@ -35,6 +36,8 @@
  draw (features) {
    const icon = this.config.icon
    const styles = this.config.styles
    Object.assign(STYLES, styles)
    const geojsonLayer = this.L.geoJSON(features, {
      style: function (feature) {
        return {
@@ -73,7 +76,7 @@
          .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer))
      }
    }).addTo(this.layer)
    window.layerFactory.setZIndex(geojsonLayer)
    setZIndex(geojsonLayer)
  }
  mouseOverListener (e, layer) {