From a1084566536c2bd91e6d0435c67864e8d2f2076c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sanguu516=28=EB=B0=95=EC=83=81=ED=98=84=29?= Date: Tue, 13 Jun 2023 16:06:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=ED=92=80=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/naver/NaverMap.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/components/map/naver/NaverMap.js b/src/components/map/naver/NaverMap.js index 4ea3897e..137c0c99 100644 --- a/src/components/map/naver/NaverMap.js +++ b/src/components/map/naver/NaverMap.js @@ -124,7 +124,6 @@ export const NaverCustomMap = () => { ]; let features = geoJson.features; - useEffect(() => { NaverMapInit(); // airPort?.map(air => polyArea(air)); @@ -181,18 +180,18 @@ export const NaverCustomMap = () => { // result.push({ lat: lat_sum, lng: lng_sum }); // console.log('coordvalue>>', coordValue); - // coordValue.map((val, idx) => { - // const po = new naver.maps.LatLng(val._lat, val._lng); - // const cont = `
${idx}번
`; - // const marker = new naver.maps.Marker({ - // position: po, - // map: mapObject, - // icon: { - // content: [cont].join(''), - // anchor: new naver.maps.Point(20, 20) - // } - // }); - // }); + coordValue.map((val, idx) => { + const po = new naver.maps.LatLng(val._lat, val._lng); + const cont = `
${idx}번
`; + const marker = new naver.maps.Marker({ + position: po, + map: mapObject, + icon: { + content: [cont].join(''), + anchor: new naver.maps.Point(20, 20) + } + }); + }); }, [mapObject, coordValue]); useEffect(() => {}, []);