diff --git a/src/components/map/naver/NaverMap.js b/src/components/map/naver/NaverMap.js index 4ea3897..137c0c9 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(() => {}, []);