From 976b3149d9e55c67fe25c78876e4da49d37b560e Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 22 Oct 2025 14:45:42 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20SN=20NGII=20=EB=B0=B0=EA=B2=BD=EC=A7=80?= =?UTF-8?q?=EB=8F=84=20=ED=98=B8=EC=B6=9C=20=EC=98=A4=ED=83=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/.env.production | 4 ++-- .../src/ui/map/lib/gis.core.js | 20 +++---------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/apps/sn/.env.production b/apps/sn/.env.production index 7da15e8bb..da8ff85cd 100644 --- a/apps/sn/.env.production +++ b/apps/sn/.env.production @@ -10,8 +10,8 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl #NEXT_PUBLIC_NGII_URL = http:///172.29.143.87/openapi/GetTile?apiKey=BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x} #NEXT_PUBLIC_NGII_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api/v1/basemap?apiKey=BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x} -NEXT_PUBLIC_NGII_URL = http:///172.29.143.87 -NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x} +NEXT_PUBLIC_NGII_URL = http://172.29.143.87 +NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={y}&tilerow={x} NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000 NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000 diff --git a/packages/common/business_components/src/ui/map/lib/gis.core.js b/packages/common/business_components/src/ui/map/lib/gis.core.js index b079c82f2..e8e05f037 100644 --- a/packages/common/business_components/src/ui/map/lib/gis.core.js +++ b/packages/common/business_components/src/ui/map/lib/gis.core.js @@ -42,7 +42,7 @@ GisApp.GOOGLE_3D_URL = `https://tile.googleapis.com/v1/3dtiles/root.json?key=${G // NGII 정보(배경지도) //GisApp.NGII_WMTS_URL = process.env.NEXT_PUBLIC_NGII_URL; -GisApp.NGII_WMTS_URL = `/ngii-server/openapi/Gettile?${process.env.NEXT_PUBLIC_NGII_PARAM}`; +GisApp.NGII_WMTS_URL = `/ngii-server/openapi/Gettile.do?apikey=${process.env.NEXT_PUBLIC_NGII_PARAM}`; GisApp.EMAP_URL = '/emap/'; GisApp.EMAP_SATELLITE_URL = '/emap/satellite/'; @@ -150,8 +150,6 @@ GisApp.core.prototype = { const resolutions = [1044.48, 522.24, 261.12, 130.56, 65.28, 32.64, 16.32, 8.16, 4.08, 2.04, 1.02, 0.51, 0.255]; const matrixIds = ["L06", "L07", "L08", "L09", "L10", "L11", "L12", "L13", "L14", "L15", "L16", "L17", "L18"]; - - const templateUrl = process.env.NEXT_PUBLIC_NGII_URL; const tileGrid = new WMTSTileGrid({ origin: getTopLeft(projection.getExtent()), resolutions: resolutions, @@ -169,25 +167,13 @@ GisApp.core.prototype = { matrixSet: 'EPSG:5179', format: 'image/png', style: 'korean', - /* - tileUrlFunction: (tileCoord) => { - const [z, x, y] = tileCoord; - const matrix = matrixIds[z]; - const replacedUrl = templateUrl - .replace("{z}", matrix) - .replace("{x}", x) - .replace("{y}", y); // 여기서는 교환 안 함 — env 템플릿이 담당 - console.log('++++++',replacedUrl) - return replacedUrl; - }, - */ }); wmtsSource.setTileUrlFunction((tileCoord) => { const [z, x, y] = tileCoord; const matrix = matrixIds[z]; - console.log(templateUrl.replace("{z}", matrix).replace("{x}", x).replace("{y}", y)); - return templateUrl + console.log(GisApp.NGII_WMTS_URL.replace("{z}", matrix).replace("{x}", x).replace("{y}", y)); + return GisApp.NGII_WMTS_URL .replace("{z}", matrix) .replace("{x}", x) .replace("{y}", y);