From d45bb6b657c26c068153d851a4876caf72a1dfaa Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 6 Aug 2025 19:51:34 +0900 Subject: [PATCH 1/3] =?UTF-8?q?remove:=20searchBar.tsx=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=82=AD=EC=A0=9C=20(=EA=B3=B5=ED=86=B5=EC=9D=98?= =?UTF-8?q?=20procSearchBar=20=EC=82=AC=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(map-layout)/map/searchBar/searchBar.tsx | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 apps/sn/app/(map-layout)/map/searchBar/searchBar.tsx diff --git a/apps/sn/app/(map-layout)/map/searchBar/searchBar.tsx b/apps/sn/app/(map-layout)/map/searchBar/searchBar.tsx deleted file mode 100644 index 43ceb14de..000000000 --- a/apps/sn/app/(map-layout)/map/searchBar/searchBar.tsx +++ /dev/null @@ -1,32 +0,0 @@ -"use client"; - -import { useState } from "react"; -import { CtpvSggPrcsFcltSelectBox } from "@/components/ui/ctpvSggPrcsFcltSelectBox"; - - -export function SearchBar() { - const [ctpv, setCtpv] = useState(0); - const [sgg, setSgg] = useState(0); - const [sggName, setSggName] = useState(''); - const [selectedSwagePrcsFclt, setSelectedSwagePrcsFclt] = useState('0'); - - return ( - <> -
- { - setCtpv(sidoId); - setSgg(0); - }} - onSigunguChange={setSgg} - setSggName={setSggName} - selectedSwagePrcsFclt={selectedSwagePrcsFclt} - onSwagePrcsFcltChange={setSelectedSwagePrcsFclt} - /> -
- - ); -} From 5383bce739eb3f93f6e9ab73f73e0b3ac0eecb0f Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 6 Aug 2025 20:19:29 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20cmncNm=20All=EC=9D=BC=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=A1=B0=ED=9A=8C=EA=B0=80=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/business_components/src/ui/map/lib/gis.layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/map/lib/gis.layer.js b/packages/common/business_components/src/ui/map/lib/gis.layer.js index 637406522..2d436ed12 100644 --- a/packages/common/business_components/src/ui/map/lib/gis.layer.js +++ b/packages/common/business_components/src/ui/map/lib/gis.layer.js @@ -121,7 +121,7 @@ GisOlLayer.prototype = { params['REQUEST'] = 'GetFeature'; params['SRS'] = toProj; params['OUTPUTFORMAT'] = 'application/json'; - params['CQL_FILTER'] = filter; + if (filter) params['CQL_FILTER'] = filter; let strParams = new URLSearchParams(params).toString(); let source = new VectorSource({ From 395590bbe4604ea8b5328c2becc2b2534a18d312 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 6 Aug 2025 20:59:56 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20gis.layer.js=20=EC=B5=9C=EC=8B=A0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/map/lib/gis.layer.js | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/packages/common/business_components/src/ui/map/lib/gis.layer.js b/packages/common/business_components/src/ui/map/lib/gis.layer.js index 9557bcb7d..2d436ed12 100644 --- a/packages/common/business_components/src/ui/map/lib/gis.layer.js +++ b/packages/common/business_components/src/ui/map/lib/gis.layer.js @@ -71,7 +71,7 @@ GisOlLayer.prototype = { /** * [사용]WFS 벡터 소스 반환 */ - getVectorSourceGeoserver: function (options) { + getVectorSourceBbox: function (options) { let url = GisApp.GEOSERVER_URL; let toProj = GisApp.TO_PROJ; let lyrTyNm = options.lyrTyNm; @@ -110,29 +110,27 @@ GisOlLayer.prototype = { getVectorTileSource: function (options) { let url = GisApp.GEOSERVER_URL; let toProj = GisApp.TO_PROJ; + let lyrTyNm = options.lyrTyNm; + let typename = this.storageNm + lyrTyNm; + let filter = options?.flterSql && options.flterSql && options.flterSql.trim() !== '' + let params = {}; - params['TYPENAME'] = this.storageNm + options.typeName; + params['TYPENAME'] = typename; params['SERVICE'] = 'WFS'; params['VERSION'] = '1.1.0'; params['REQUEST'] = 'GetFeature'; params['SRS'] = toProj; params['OUTPUTFORMAT'] = 'application/json'; + if (filter) params['CQL_FILTER'] = filter; let strParams = new URLSearchParams(params).toString(); - let source = new VectorTile({ + let source = new VectorSource({ format: new GeoJSON(), - - tileUrlFunction: function (tileCoord, pixelRatio, projection) { - let filterStr = '&CQL_FILTER=bbox(GEOM,' + source.getTileGrid().getTileCoordExtent(tileCoord).join(',') + ",'" + projection.getCode() + "')"; - if (options.flterSql) { - filterStr += ' AND ' + options.flterSql; - } - let paramWithUrl = url + '?' + strParams + filterStr; - return paramWithUrl; + url: function (extent) { + return url + '?' + strParams; }, - tileGrid: createXYZ, + strategy: all, }); - return source; }, /** @@ -142,19 +140,19 @@ GisOlLayer.prototype = { option = option || {}; //레이어 생성 let returnLayer = this.makeLayer(option); + //레이어 소스 생성 let source; + let cmncNm = option.cmncNm; - let lyrTyNm = option.lyrTyNm; - if(lyrTyNm == 'tb_ms_flood_dngr_map' - || lyrTyNm == 'tb_ms_sbmrg_dngr_map' - || lyrTyNm == 'tb_ms_swage_mhl' - || lyrTyNm == 'tb_ms_swage_ppl' - || lyrTyNm == 'tb_ms_swage_pmstn' - ) { - source = this.getVectorSourceBbox(option); - }else { - source = this.getVectorTileSource(option); + try { + if(cmncNm == 'bbox') { + source = this.getVectorSourceBbox(option); + }else { + source = this.getVectorTileSource(option); + } + }catch(error){ + console.warn(option); } returnLayer.setSource(source); @@ -567,6 +565,15 @@ GisOlLayer.prototype = { cesiumScene.camera.moveEnd.addEventListener(cesiumScene._moveEndListener); } }, + getFeatureById: function(featureId){ + this.layers + .getArray() + .forEach(layer => { + const source = layer.getSource(); + const feature = source.getFeatureById(String(featureId).trim()); + if (feature) return feature; + }); + } }; function getOpenLayersZoom(cesiumScene) {