CzRger 1 年間 前
コミット
ea49a00381

+ 162 - 62
src/store/modules/gis.ts

@@ -16,6 +16,11 @@ import axios from "axios";
 import {geometry} from "@turf/turf";
 import {formatPosition} from "@/utils/easyMap";
 
+const formatWkt = (wkt) => {
+  return wkt.split(',').join('\\\,')
+}
+const featureTypeKey = 'featureType'
+
 const state = {
   menuRootName: '9cd5fbf9-35fd-4fb2-8c24-1f871afd67be',
   isTooling: false,
@@ -45,6 +50,8 @@ const state = {
       analysisLayer: null,
       analysisSource: null,
       analysisCircle: null,
+      analysisWKT: '',
+      analysisDeviceLayer: null
     }
   },
   element: {
@@ -112,10 +119,14 @@ const mutations = {
   },
   SET_GIS_MAP(state, {map, defaultDom, qyDom}) {
     state.map = map
+    state.element.layer = new layer.Tile({
+      zIndex: 10,
+    })
+    state.map.addLayer(state.element.layer)
     // 基本要素
     state.gisParams.default.source = new source.Vector()
     state.gisParams.default.layer = new layer.Vector({
-      zIndex: 200,
+      zIndex: 40,
       source: state.gisParams.default.source,
     })
     state.gisParams.default.layer.set('layerName', 'gisDefault')
@@ -135,7 +146,7 @@ const mutations = {
     // 企业要素
     state.gisParams.qy.source = new source.Vector()
     state.gisParams.qy.layer = new layer.Vector({
-      zIndex: 202,
+      zIndex: 50,
       source: state.gisParams.qy.source,
     })
     state.gisParams.qy.layer.set('layerName', 'gisQy')
@@ -155,7 +166,7 @@ const mutations = {
     // 企业-周边设备
     state.gisParams.qy.analysisSource = new source.Vector()
     state.gisParams.qy.analysisLayer = new layer.Vector({
-      zIndex: 202,
+      zIndex: 20,
       source: state.gisParams.qy.analysisSource,
       style: [
         new style.Style({
@@ -171,7 +182,102 @@ const mutations = {
       ]
     });
     state.gisParams.qy.analysisCircle = new ol.Feature()
+    state.gisParams.qy.analysisCircle.set(featureTypeKey, 'analysisCircle')
     state.map.addLayer(state.gisParams.qy.analysisLayer)
+    state.gisParams.qy.analysisDeviceLayer = new layer.Tile({
+      zIndex: 30
+    })
+    state.map.addLayer(state.gisParams.qy.analysisDeviceLayer)
+    const clickQy = (e, feat) => {
+      if (state.gisParams.qy.overlay.getPosition() === undefined) {
+        state.gisParams.qy.overlay.setPosition(state.gisParams.qy.feature.getGeometry().getCoordinates())
+      } else {
+        state.gisParams.qy.overlay.setPosition(undefined)
+      }
+    }
+    const clickDefault = (e, feat) => {
+      if (state.gisParams.default.overlay.getPosition() === undefined) {
+        state.gisParams.default.overlay.setPosition(state.gisParams.default.feature.getGeometry().getCoordinates())
+      } else {
+        state.gisParams.default.overlay.setPosition(undefined)
+      }
+    }
+    const clickAnalysisCircle = (e, feat) => {
+      const viewResolution = e.map.getView().getResolution()
+      const url = state.gisParams.qy.analysisDeviceLayer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
+        'INFO_FORMAT': 'application/json',
+        'FEATURE_COUNT': 10000
+      })
+      if (url) {
+        axios.get(url).then(res => {
+          if (res.status === 200) {
+            const item = res.data?.features?.[res.data?.features?.length - 1]
+            if (item) {
+              store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
+                wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                id: item.properties.elementId,
+                info: item.properties,
+                config: {
+                  isAnalysis: true
+                }
+              })
+            }
+          }
+        })
+      }
+    }
+    state.map.on('singleclick', e => {
+      let isFeature = false
+      e.map.forEachFeatureAtPixel(e.pixel, (feature) => {
+        if (!isFeature) {
+          switch (feature.get(featureTypeKey)) {
+            case 'qy': clickQy(e, feature)
+              break
+            case 'sb': clickDefault(e, feature)
+              break
+            case 'analysisCircle': clickAnalysisCircle(e, feature)
+              break
+          }
+          isFeature = true
+        }
+      }, {
+        hitTolerance: 0,
+      });
+      if (state.element.list.some(v => v.active)) {
+        if (!isFeature) {
+          const viewResolution = e.map.getView().getResolution()
+          const url = state.element.layer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
+            'INFO_FORMAT': 'application/json',
+            'FEATURE_COUNT': 10000
+          })
+          if (url) {
+            axios.get(url).then(res => {
+              if (res.status === 200) {
+                const item = res.data?.features?.[res.data?.features?.length - 1]
+                if (item) {
+                  console.log(item)
+                  if (['lgszyjkscsb', 'jgzzmgs', 'lgsjkfzl'].includes(item.properties.typeValue)) {
+                    store.commit('gis/SET_GIS_PARAMS_QY_RESET')
+                    store.commit('gis/SET_GIS_PARAMS_QY', {
+                      wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                      id: item.properties.elementId,
+                      info: item.properties
+                    })
+                  } else if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
+                    store.commit('gis/SET_GIS_PARAMS_DEFAULT_RESET')
+                    store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
+                      wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
+                      id: item.properties.elementId,
+                      info: item.properties
+                    })
+                  }
+                }
+              }
+            })
+          }
+        }
+      }
+    })
   },
   SET_GIS_PARAMS_QY(state, {wkt, id, info, config = {}}: any) {
     const {
@@ -214,8 +320,8 @@ const mutations = {
         }
         newFeat.set('defaultStyle', QyStyle.qyStyle(type))
         newFeat.set('activeStyle', [...CommonStyle.activeStyle(), ...QyStyle.qyStyle(type)])
-        newFeat.set('analysisStyle', [...CommonStyle.analysisStyle(), ...QyStyle.qyStyle(type)])
-        newFeat.set('analysisActiveStyle', [...CommonStyle.activeStyle(), ...CommonStyle.analysisStyle(), ...QyStyle.qyStyle(type)])
+        newFeat.set('analysisStyle', [...QyStyle.qyAnalysisStyle(type)])
+        newFeat.set('analysisActiveStyle', [...CommonStyle.activeStyle(), ...QyStyle.qyAnalysisStyle(type)])
         newFeat.set('isAnalysis', isAnalysis)
         newFeat.set('resetStyle', () => {
           if (newFeat.get('isAnalysis')) {
@@ -225,7 +331,7 @@ const mutations = {
           }
         })
         newFeat.get('resetStyle')()
-        newFeat.set('featureType', JSON.parse(JSON.stringify(state.gisParams.qy.type)))
+        newFeat.set(featureTypeKey, JSON.parse(JSON.stringify(state.gisParams.qy.type)))
         newFeat.set('info', JSON.parse(JSON.stringify(state.gisParams.qy.info)))
         newFeat.set('apiData', JSON.parse(JSON.stringify(info)))
         newFeat.setId(id)
@@ -247,11 +353,20 @@ const mutations = {
       state.gisParams.qy.feature = null
       //  周边设备清除样式
       state.gisParams.qy.analysisSource.clear()
+      state.gisParams.qy.analysisDeviceLayer.setSource(null)
+      state.gisParams.qy.analysisWKT = ''
       state.gisParams.default.feature?.set('isAnalysis', false)
       state.gisParams.default.feature?.get('resetStyle')()
       store.commit('gis/SET_GIS_ELEMENT')
     }
   },
+  SET_GIS_PARAMS_QY_ANALYSIS(state) {
+    if (state.gisParams.qy.analysisDeviceLayer) {
+      state.gisParams.qy.analysisWKT = formatPosition.cpnTwpn(state.gisParams.qy.analysisCircle.getGeometry().getCoordinates())
+      store.commit('gis/SET_GIS_ELEMENT')
+      store.commit('gis/SET_GIS_ANALYSIS_ELEMENT')
+    }
+  },
   SET_GIS_PARAMS_DEFAULT_SB(state, {wkt, id, info, config = {}}: any) {
     const {
       isAnalysis = false
@@ -272,8 +387,8 @@ const mutations = {
         }
         newFeat.set('defaultStyle', SbStyle.sbStyle(type))
         newFeat.set('activeStyle', [...CommonStyle.activeStyle(), ...SbStyle.sbStyle(type)])
-        newFeat.set('analysisStyle', [...CommonStyle.analysisStyle(), ...SbStyle.sbStyle(type)])
-        newFeat.set('analysisActiveStyle', [...CommonStyle.activeStyle(), ...CommonStyle.analysisStyle(), ...SbStyle.sbStyle(type)])
+        newFeat.set('analysisStyle', [...SbStyle.sbAnalysisStyle(type)])
+        newFeat.set('analysisActiveStyle', [...CommonStyle.activeStyle(), ...SbStyle.sbAnalysisStyle(type)])
         newFeat.set('isAnalysis', isAnalysis)
         newFeat.set('resetStyle', () => {
           if (newFeat.get('isAnalysis')) {
@@ -283,7 +398,7 @@ const mutations = {
           }
         })
         newFeat.get('resetStyle')()
-        newFeat.set('featureType', JSON.parse(JSON.stringify(state.gisParams.default.type)))
+        newFeat.set(featureTypeKey, JSON.parse(JSON.stringify(state.gisParams.default.type)))
         newFeat.set('info', JSON.parse(JSON.stringify(state.gisParams.default.info)))
         newFeat.set('apiData', JSON.parse(JSON.stringify(info)))
         newFeat.setId(id)
@@ -319,7 +434,7 @@ const mutations = {
           }
         })
         newFeat.get('resetStyle')()
-        newFeat.set('featureType', JSON.parse(JSON.stringify(state.gisParams.default.type)))
+        newFeat.set(featureTypeKey, JSON.parse(JSON.stringify(state.gisParams.default.type)))
         newFeat.set('info', JSON.parse(JSON.stringify(state.gisParams.default.info)))
         newFeat.set('apiData', JSON.parse(JSON.stringify(info)))
         newFeat.setId(id)
@@ -355,7 +470,7 @@ const mutations = {
           }
         })
         newFeat.get('resetStyle')()
-        newFeat.set('featureType', JSON.parse(JSON.stringify(state.gisParams.default.type)))
+        newFeat.set(featureTypeKey, JSON.parse(JSON.stringify(state.gisParams.default.type)))
         newFeat.set('info', JSON.parse(JSON.stringify(state.gisParams.default.info)))
         newFeat.set('apiData', JSON.parse(JSON.stringify(info)))
         newFeat.setId(id)
@@ -391,7 +506,7 @@ const mutations = {
           }
         })
         newFeat.get('resetStyle')()
-        newFeat.set('featureType', JSON.parse(JSON.stringify(state.gisParams.default.type)))
+        newFeat.set(featureTypeKey, JSON.parse(JSON.stringify(state.gisParams.default.type)))
         newFeat.set('info', JSON.parse(JSON.stringify(state.gisParams.default.info)))
         newFeat.set('apiData', JSON.parse(JSON.stringify(info)))
         newFeat.setId(id)
@@ -427,7 +542,7 @@ const mutations = {
           }
         })
         newFeat.get('resetStyle')()
-        newFeat.set('featureType', JSON.parse(JSON.stringify(state.gisParams.default.type)))
+        newFeat.set(featureTypeKey, JSON.parse(JSON.stringify(state.gisParams.default.type)))
         newFeat.set('info', JSON.parse(JSON.stringify(state.gisParams.default.info)))
         newFeat.set('apiData', JSON.parse(JSON.stringify(info)))
         newFeat.setId(id)
@@ -465,7 +580,7 @@ const mutations = {
         }
       }
     })
-    const cql: any = []
+    const cql: any = ["(geoType = 2)"]
     cql.push(`(typeValue in (${arr.length > 0 ? arr.join(',') : -1}))`)
     const notIds: Array<string> = []
     if (state.gisParams.default.feature) {
@@ -477,6 +592,10 @@ const mutations = {
     if (notIds.length > 0) {
       cql.push(`(elementId not in (${notIds.join(',')}))`)
     }
+    let vp: null | string = null
+    if (state.gisParams.qy.analysisWKT) {
+      vp = `locationValue:${formatWkt(state.gisParams.qy.analysisWKT)}`
+    }
     const tileWMS = new source.TileWMS({
       url: `/${store.state.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
       params: {
@@ -484,60 +603,41 @@ const mutations = {
         'VERSION': '1.1.1',
         "exceptions": 'application/vnd.ogc.se_inimage',
         refresh: new Date().getTime(),
+        // LAYERS: 'mysqlGeo:gis-test',
         LAYERS: 'mysqlGeo:socialManagementElement',
+        viewparams: vp,
         CQL_FILTER: `(${cql.join(' and ')})`
       }
     })
-    if (!state.element.layer) {
-      state.element.layer = new layer.Tile({
-        source: tileWMS,
-        zIndex: 2,
-      })
-      state.map.addLayer(state.element.layer)
-      state.map.on('singleclick', e => {
-        if (state.element.list.some(v => v.active)) {
-          let isFeature = false
-          e.map.forEachFeatureAtPixel(e.pixel, (feature) => {
-            isFeature = true
-          }, {
-            hitTolerance: 0,
-          });
-          if (!isFeature) {
-            const viewResolution = e.map.getView().getResolution()
-            const url = state.element.layer.getSource().getFeatureInfoUrl(e.coordinate, viewResolution, 'EPSG:4326', {
-              'INFO_FORMAT': 'application/json',
-              'FEATURE_COUNT': 10000
-            })
-            if (url) {
-              axios.get(url).then(res => {
-                if (res.status === 200) {
-                  const item = res.data?.features?.[res.data?.features?.length - 1]
-                  if (item) {
-                    console.log(item)
-                    if (['lgszyjkscsb', 'jgzzmgs', 'lgsjkfzl'].includes(item.properties.typeValue)) {
-                      console.log('企业')
-                      store.commit('gis/SET_GIS_PARAMS_QY', {
-                        wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                        id: item.properties.elementId,
-                        info: item.properties
-                      })
-                    } else if (['gal', 'shl', 'myl'].includes(item.properties.typeValue)) {
-                      console.log('设备')
-                      store.commit('gis/SET_GIS_PARAMS_DEFAULT_SB', {
-                        wkt: `POINT(${item.geometry.coordinates.join(' ')})`,
-                        id: item.properties.elementId,
-                        info: item.properties
-                      })
-                    }
-                  }
-                }
-              })
-            }
-          }
+    state.element.layer.setSource(tileWMS)
+  },
+  SET_GIS_ANALYSIS_ELEMENT(state) {
+    if (state.gisParams.qy.analysisWKT) {
+      const cql: any = ["(geoType = 1)", "(typeValue in ('gal', 'shl', 'myl'))"]
+      const notIds: Array<string> = []
+      if (state.gisParams.default.feature) {
+        notIds.push(`'${state.gisParams.default.feature.getId()}'`)
+      }
+      if (state.gisParams.qy.feature) {
+        notIds.push(`'${state.gisParams.qy.feature.getId()}'`)
+      }
+      if (notIds.length > 0) {
+        cql.push(`(elementId not in (${notIds.join(',')}))`)
+      }
+
+      const tileWMS = new source.TileWMS({
+        url: `/${store.state.app.apiProxy.geoserverApi}/geoserver/mysqlGeo/wms`,
+        params: {
+          'FORMAT': 'image/png8',
+          'VERSION': '1.1.1',
+          "exceptions": 'application/vnd.ogc.se_inimage',
+          refresh: new Date().getTime(),
+          LAYERS: 'mysqlGeo:socialManagementElement',
+          viewparams: `locationValue:${formatWkt(state.gisParams.qy.analysisWKT)}`,
+          CQL_FILTER: `(${cql.join(' and ')})`
         }
       })
-    } else {
-      state.element.layer.setSource(tileWMS)
+      state.gisParams.qy.analysisDeviceLayer.setSource(tileWMS)
     }
   }
 }

+ 20 - 20
src/utils/easyMap.ts

@@ -408,47 +408,47 @@ export const getShapeView3 = (map, source, L = 600) => {
 };
 
 export const formatPosition = {
-  wptTwl: (arr) => {  // WKT POINT ARR TO WKT LINESTRING
+  wptTwl: (pointWktArr) => {  // WKT POINT ARR TO WKT LINESTRING
     // @ts-ignore
-    const temp = arr.map(v => (new format.WKT().readFeature(v).getGeometry().getCoordinates()))
+    const temp = pointWktArr.map(v => (new format.WKT().readFeature(v).getGeometry().getCoordinates()))
     return new format.WKT().writeGeometry(new geom.LineString(proj.fromLonLat(temp, 'EPSG:4326')), {
       dataProjection: 'EPSG:4326'
     })
   },
-  cptTwpt: (cpt) => {  // coordinates POINT TO WKT POINT
-    return `POINT(${cpt[0]} ${cpt[1]})`
+  cptTwpt: (pointCoor) => {  // coordinates POINT TO WKT POINT
+    return `POINT(${pointCoor[0]} ${pointCoor[1]})`
   },
-  wptTcpt: (wpt) => {  // WKT POINT TO coordinates POINT
+  wptTcpt: (pointWkt) => {  // WKT POINT TO coordinates POINT
     // @ts-ignore
-    return new format.WKT().readFeature(wpt).getGeometry().getCoordinates()
+    return new format.WKT().readFeature(pointWkt).getGeometry().getCoordinates()
   },
-  wptTcptF: (wpt, digits = 0) => {  // WKT POINT TO coordinates format东经北纬 POINT
+  wptTcptF: (pointWkt, digits = 0) => {  // WKT POINT TO coordinates format东经北纬 POINT
     // @ts-ignore
-    const coor = new format.WKT().readFeature(wpt).getGeometry().getCoordinates()
+    const coor = new format.WKT().readFeature(pointWkt).getGeometry().getCoordinates()
     const f = Coordinate.toStringHDMS(coor, digits).split(' ')
     const formatLongitude = `${f[4]}${f[5]}${f[6]}${f[7]}`
     const formatLatitude = `${f[0]}${f[1]}${f[2]}${f[3]}`
     return [formatLongitude, formatLatitude]
   },
-  wpnTcpn: (wpn) => {  // WKT POLYGON TO coordinates POLYGON
+  wpnTcpn: (polygonWkt) => {  // WKT POLYGON TO coordinates POLYGON
     // @ts-ignore
-    return new format.WKT().readFeature(wpn).getGeometry().getCoordinates()
+    return new format.WKT().readFeature(polygonWkt).getGeometry().getCoordinates()
   },
-  cpnTwpn: (cpn) => {  // coordinates POLYGON TO WKT POLYGON
-    return `POLYGON(${cpn.map(v => '(' + v.map(c => `${c[0]} ${c[1]}`).join(',') + ')')})`
+  cpnTwpn: (polygonCoor) => {  // coordinates POLYGON TO WKT POLYGON
+    return `POLYGON(${polygonCoor.map(v => '(' + v.map(c => `${c[0]} ${c[1]}`).join(',') + ')')})`
   },
-  cmpnTwmpn: (cmpt) => {  // coordinates MULTIPOLYGON TO WKT MULTIPOLYGON
-    return `MULTIPOLYGON(${cmpt.map(v1 => `(${v1.map(v => '(' + v.map(c => `${c[0]} ${c[1]}`).join(',') + ')')})`)})`
+  cmpnTwmpn: (multipolygonCoor) => {  // coordinates MULTIPOLYGON TO WKT MULTIPOLYGON
+    return `MULTIPOLYGON(${multipolygonCoor.map(v1 => `(${v1.map(v => '(' + v.map(c => `${c[0]} ${c[1]}`).join(',') + ')')})`)})`
   },
-  wmpnTcmpn: (wmpn) => {  // WKT MULTIPOLYGON TO coordinates MULTIPOLYGON
+  wmpnTcmpn: (multipolygonWkt) => {  // WKT MULTIPOLYGON TO coordinates MULTIPOLYGON
     // @ts-ignore
-    return new format.WKT().readFeature(wmpn).getGeometry().getCoordinates()
+    return new format.WKT().readFeature(multipolygonWkt).getGeometry().getCoordinates()
   },
-  wlTcl: (wl) => {  // WKT LINESTRING TO coordinates LINESTRING
+  wlTcl: (linestringWkt) => {  // WKT LINESTRING TO coordinates LINESTRING
     // @ts-ignore
-    return new format.WKT().readFeature(wl).getGeometry().getCoordinates()
+    return new format.WKT().readFeature(linestringWkt).getGeometry().getCoordinates()
   },
-  clTwl: (cl) => {  // coordinates LINESTRING TO WKT LINESTRING
-    return `LINESTRING(${cl.map(c => `${c[0]} ${c[1]}`).join(',')})`
+  clTwl: (linestringCoor) => {  // coordinates LINESTRING TO WKT LINESTRING
+    return `LINESTRING(${linestringCoor.map(c => `${c[0]} ${c[1]}`).join(',')})`
   }
 }

+ 1 - 1
src/views/gis/layout/tools/analysis.vue

@@ -321,7 +321,7 @@ export default defineComponent({
       }
     }
     const  setCircle = () => {
-      const circle = turf.circle(state.cusTransfer.draw.center, state.cusTransfer.draw.radius, {steps: 1024, units: 'kilometers'})
+      const circle = turf.circle(state.cusTransfer.draw.center, state.cusTransfer.draw.radius, {steps: 32, units: 'kilometers'})
       state.cusTransfer.analysisFeat.setGeometry(new geom.Polygon(circle.geometry.coordinates))
     }
     const initData = () => {

+ 6 - 1
src/views/gis/map-info/overlay/qy/index.vue

@@ -116,14 +116,19 @@ export default defineComponent({
       }
     }
     const setCircle = () => {
-      const circle = turf.circle(qyInfoCpt.value['5'].center, qyInfoCpt.value['5'].radius, {steps: 1024, units: 'kilometers'})
+      const circle = turf.circle(qyInfoCpt.value['5'].center, qyInfoCpt.value['5'].radius, {steps: 32, units: 'kilometers'})
       store.state.gis.gisParams.qy.analysisCircle.setGeometry(new geom.Polygon(circle.geometry.coordinates))
     }
     const onRadiusSubmit = () => {
       if (!qyInfoCpt.value['5'].radiusTips) {
+        store.state.gis.gisParams.qy.feature.set('isAnalysis', true)
+        store.state.gis.gisParams.qy.feature.get('resetStyle')()
+        store.state.gis.gisParams.default.feature?.set('isAnalysis', true)
+        store.state.gis.gisParams.default.feature?.get('resetStyle')()
         store.state.gis.gisParams.qy.analysisSource.clear()
         store.state.gis.gisParams.qy.analysisSource.addFeature(store.state.gis.gisParams.qy.analysisCircle)
         setCircle()
+        store.commit('gis/SET_GIS_PARAMS_QY_ANALYSIS')
         qyInfoCpt.value['5'].tableData = []
         // qyInfoCpt.value['5'].loading = true
         // that.$api.deviceQuery({

+ 28 - 0
src/views/gis/map-info/style/qy.ts

@@ -42,6 +42,34 @@ const qyStyle = (type) => {
     // }))
     return _style
 }
+const qyAnalysisStyle = (type) => {
+    const _style: any = []
+    let img
+    if (type === 'lgszyjkscsb') {
+        img = lgszyjkscsbImg
+    } else if (type === 'jgzzmgs') {
+        img = jgzzmgsImg
+    } else if (type === 'lgsjkyfl') {
+        img = lgsjkyflImg
+    }
+    _style.push(new style.Style({
+        image: new style.Icon({
+            src: img,
+            scale: 26 / 40 * 1.5,
+            displacement: [0, 30]
+        }),
+    }))
+    _style.push(new style.Style({
+        image: new style.Circle({
+            radius: 5,
+            fill: new style.Fill({
+                color: '#e810dd',
+            }),
+        }),
+    }))
+    return _style
+}
 export default {
     qyStyle,
+    qyAnalysisStyle
 }

+ 28 - 0
src/views/gis/map-info/style/sb.ts

@@ -42,6 +42,34 @@ const sbStyle = (type) => {
     // }))
     return _style
 }
+const sbAnalysisStyle = (type) => {
+    const _style: any = []
+    let img
+    if (type === 'galsb') {
+        img = galsbImg
+    } else if (type === 'shlsb') {
+        img = shlsbImg
+    } else if (type === 'mylsb') {
+        img = mylsbImg
+    }
+    _style.push(new style.Style({
+        image: new style.Icon({
+            src: img,
+            scale: 26 / 40 * 1.5,
+            displacement: [0, 30]
+        }),
+    }))
+    // _style.push(new style.Style({
+    //     image: new style.Circle({
+    //         radius: 5,
+    //         fill: new style.Fill({
+    //             color: '#e810dd',
+    //         }),
+    //     }),
+    // }))
+    return _style
+}
 export default {
     sbStyle,
+    sbAnalysisStyle
 }