派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-03-02 e18f87bfee0e6f76950b580776216db9a7abe26f
修改专题搜索结果面板样式
2个文件已修改
12 ■■■■ 已修改文件
src/components/helpers/ServiceLayerHelper.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSearch.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
  }
src/components/panel/topicSearch/SewersSearch.vue
@@ -178,6 +178,9 @@
    },
    handleLocation (val) {
      console.log(val)
      const bound = this.L.geoJSON([val], {}).getBounds()
      console.log(bound)
      this.$store.state.map.flyToBounds(bound)
    }
  }
}