派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-03-10 69fab1868d98e69c81e04d877185a432261baf3d
src/components/helpers/ServiceLayerHelper.js
@@ -171,9 +171,7 @@
        console.log(feature)
        console.log(layer)
        featureList.push(layer)
        layer.addTo(featureGroup)
      }
    }).bindPopup(function (layer) {
        layer.bindPopup(function (layer) {
      that.popupComp.setDatas(layer)
      that.popupComp.setShow()
      return that.popupComp.$el
@@ -197,8 +195,7 @@
        return name
      }, { direction: 'bottom', offset: [0, 15], sticky: true })
      .on('mouseover', function (e) {
        const layer = e.layer
        const type = e.layer.feature.geometry.type
            const type = e.target.feature.geometry.type
        if (type === 'LineString' || type === 'MultiLineString') {
          layer.setStyle({ weight: 8, color: '#00ffff' })
        } else if (type === 'Point' || type === 'MultiPoint') {
@@ -212,8 +209,7 @@
          layer.bringToFront()
        }
      }).on('mouseout', function (e) {
        const layer = e.layer
        const type = e.layer.feature.geometry.type
            const type = e.target.feature.geometry.type
        if (type === 'LineString' || type === 'MultiLineString') {
          layer.setStyle({ weight: styles.defaultLineStyle.weight, color: styles.defaultLineStyle.color })
        }
@@ -225,8 +221,8 @@
            }
          })
        }
      // }).addTo(that.map)
      // }).addTo(featureGroup)
          }).addTo(featureGroup)
      }
      })
    store.commit('addSewersDatas', geojson)
    featureGroup.addTo(that.map)