From cb85033879c74f34925a303402c1ad3e4a8646f2 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期一, 10 五月 2021 17:03:54 +0800
Subject: [PATCH] 搜索更换为geoserver wfs,图层顺序,弹窗定位等

---
 src/conf/layers/LayerPipeLines.js |   77 +++++++++++++++++++++++---------------
 1 files changed, 46 insertions(+), 31 deletions(-)

diff --git a/src/conf/layers/LayerPipeLines.js b/src/conf/layers/LayerPipeLines.js
index bb746d9..8dea07c 100644
--- a/src/conf/layers/LayerPipeLines.js
+++ b/src/conf/layers/LayerPipeLines.js
@@ -4,8 +4,7 @@
 import { LayerHbss } from './LayerHbss'
 import { LayerFsss } from './LayerFsss'
 
-import { PIPELINE_WFS } from '../Constants'
-const WFS_URL = PIPELINE_WFS
+import { SERVICE_TYPE } from '../Constants'
 
 export const LayerPipeLines = {
   code: 'sewersPipeLines',
@@ -19,110 +18,126 @@
       name: '闆ㄦ按绾�',
       sname: '绠$綉',
       checked: false,
-      type: 0,
-      wmsLayers: 'sewer:pipeline_rain',
-      // wfs: WFS_URL + '?TYPENAME=绠$綉&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>mediumtype</PropertyName><Literal>闆ㄦ按绠$嚎</Literal></PropertyIsEqualTo></Filter>',
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
       icon: 'sewers/闆ㄦ按绾�.png',
       color: '#0070ff',
       minZoom: 13,
       styles: {
         COLOR: '#0070ff',
         FILL_COLOR: '#0070ff'
-      }
+      },
+      filter: 'mediumtype = \'闆ㄦ按\'',
+      index: 1
     },
     {
       code: 'accidentline',
       name: '浜嬫晠姘�',
       sname: '浜嬫晠姘�',
       checked: false,
-      // wmsLayers: 'sewer:pipeline_accident',
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
       minZoom: 13,
-      wfs: WFS_URL + '?TYPENAME=浜嬫晠姘�'
+      filter: 'mediumtype = \'浜嬫晠姘碶'',
+      index: 1
     },
     {
       code: 'oilline',
       name: '鍚补姹℃按',
       sname: '鍚补姹℃按',
       checked: false,
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
       minZoom: 13,
       color: '#ffaa00',
-      wmsLayers: 'sewer:pipeline_sewer',
-      // wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipeline&maxFeatures=500&outputFormat=application%2Fjson&cql_filter=mediumtype=\'鍚补姹℃按\'',
+      filter: 'mediumtype = \'鍚补\'',
       styles: {
         COLOR: '#ffaa00',
         FILL_COLOR: '#ffaa00'
-      }
+      },
+      index: 1
     },
     {
       code: 'saltline',
       name: '鍚洂姹℃按',
       sname: '鍚洂姹℃按',
       checked: false,
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
       minZoom: 13,
-      wfs: WFS_URL + '?TYPENAME=鍚洂姹℃按'
+      filter: 'mediumtype = \'鍚洂\'',
+      index: 1
     },
     {
       code: 'alkaliline',
       name: '鍚⒈姹℃按',
       sname: '鍚⒈姹℃按',
       checked: false,
-      type: 0,
-      wfs: WFS_URL + '?TYPENAME=鍚⒈姹℃按',
-      minZoom: 10
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
+      filter: 'mediumtype = \'鍚⒈\'',
+      minZoom: 10,
+      index: 1
     },
     {
       code: 'sulfurline',
       name: '鍚~姹℃按',
       sname: '鍚~姹℃按',
       checked: false,
-      type: 0,
-      wmsLayers: 'sewer:pipeline_sulfur',
-      // wfs: WFS_URL + '?TYPENAME=鍚⒈姹℃按',
-      minZoom: 10
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
+      filter: 'mediumtype = \'鍚~\'',
+      minZoom: 10,
+      index: 1
     },
     {
       code: 'lifeline',
       name: '鐢熸椿姹℃按',
       sname: '鐢熸椿姹℃按',
       checked: false,
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
+      filter: 'mediumtype = \'鐢熸椿姹℃按\'',
       minZoom: 13,
-      wfs: WFS_URL + '?TYPENAME=鐢熸椿姹℃按'
+      index: 1
     },
     {
       code: 'purifyline',
       name: '鍑�鍖栨按',
       sname: '鍑�鍖栨按',
       checked: false,
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
+      filter: 'mediumtype = \'鍑�鍖栨按\'',
       minZoom: 13,
-      wfs: WFS_URL + '?TYPENAME=鍑�鍖栨按'
+      index: 1
     },
     {
       code: 'loopline',
       name: '寰幆姘�',
       sname: '寰幆姘�',
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
+      filter: 'mediumtype = \'寰幆姘碶'',
       checked: false,
       minZoom: 13,
-      wfs: WFS_URL + '?TYPENAME=寰幆姘�'
+      index: 1
     },
     {
       code: 'buildline',
       name: '鐢熶骇姹℃按',
       sname: '鐢熶骇姹℃按',
       checked: false,
-      type: 0,
+      type: SERVICE_TYPE.WMS,
+      typeName: 'sewer:pipeline',
+      filter: 'mediumtype = \'鐢熶骇姹℃按\'',
       minZoom: 13,
       color: '#a8a800',
-      wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipeline&maxFeatures=500&outputFormat=application%2Fjson&cql_filter=mediumtype=\'鐢熶骇姹℃按\'',
       styles: {
         COLOR: '#a8a800',
         FILL_COLOR: '#a8a800'
-      }
+      },
+      index: 1
     }
   ]
 }

--
Gitblit v1.8.0