派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-03-02 e18f87bfee0e6f76950b580776216db9a7abe26f
src/components/helpers/ServiceLayerHelper.js
@@ -93,7 +93,7 @@
    var that = this
    var icon = layer.icon
    const featureGroup = that.L.featureGroup().addTo(that.map)
    that.L.geoJSON(res.features, {
    const geojson = that.L.geoJSON(res.features, {
      style: function (feature) {
        return {
          fill: true,
@@ -126,7 +126,12 @@
      minWidth: 300,
      closeButton: false,
      autoClose: false
    }).addTo(featureGroup).bringToBack()
    }).addTo(featureGroup)
    if (Object.prototype.hasOwnProperty.call(res, 'features') && res.features.length > 0 && (res.features[0].geometry.type === 'LineString' || res.features[0].geometry.type === 'MultiLineString')) {
      geojson.bringToBack()
    } else {
      geojson.bringToFront()
    }
    return featureGroup
  }