派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-11 8d9c17cd5166ad31e3357070e95ee73002f34de5
src/components/LayerController/service/WfsLayerService.js
@@ -63,8 +63,15 @@
            })
        },
        onEachFeature: (feature, layer) => {
          const popupDatas = []
          const properties = feature.properties
          popupDatas.push({
            title: properties.wellname || properties.devicename || properties.name,
            name: feature.id,
            content: properties
          })
          layer.bindPopup((layer) => {
            this.popupComp.setDatas(layer)
            this.popupComp.setDatas(popupDatas)
            this.popupComp.setShow()
            return this.popupComp.$el
          }, {
@@ -85,10 +92,7 @@
    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: {
@@ -104,10 +108,7 @@
    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({