派生自 wuyushui/SewerAndRainNetwork

ChenZeping
2021-04-29 c56e506fd34c58209240e97fc29043639fae5d19
src/components/LayerController/service/WfsLayerService.js
@@ -63,7 +63,7 @@
            })
        },
        onEachFeature: (feature, layer) => {
          layer.bindPopup((layer) => {
          /* layer.bindPopup((layer) => {
            this.popupComp.setDatas(layer)
            this.popupComp.setShow()
            return this.popupComp.$el
@@ -72,8 +72,12 @@
            minWidth: 300,
            closeButton: false,
            autoClose: false
          }) */
          layer.bindTooltip((layer) => this.tooltipListener(layer), {
            direction: 'bottom',
            offset: [0, 15],
            sticky: true
          })
            .bindTooltip((layer) => this.tooltipListener(layer), { direction: 'bottom', offset: [0, 15], sticky: true })
            .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer))
        }
      }).addTo(this.layer)
@@ -85,7 +89,10 @@
    const icon = this.config.icon
    const type = e.target.feature.geometry.type
    if (type === 'LineString' || type === 'MultiLineString') {
      layer.setStyle({ weight: 8, color: '#00ffff' })
      layer.setStyle({
        weight: 8,
        color: '#00ffff'
      })
    } else if (type === 'Point' || type === 'MultiPoint') {
      layer.setStyle({
        img: {
@@ -101,7 +108,10 @@
    const icon = this.config.icon
    const type = e.target.feature.geometry.type
    if (type === 'LineString' || type === 'MultiLineString') {
      layer.setStyle({ weight: STYLES.WEIGHT, color: STYLES.COLOR })
      layer.setStyle({
        weight: STYLES.WEIGHT,
        color: STYLES.COLOR
      })
    }
    if (type === 'Point' || type === 'MultiPoint') {
      layer.setStyle({
@@ -127,4 +137,5 @@
    return name
  }
}
export default WfsLayerService