tmap api ref.current.destroy is not a function
polygon이 바뀔때마다 새롭게 1)지도생성 2)폴리콘생성 3)edge맞춤을 하고, cleanUp 함수로 지도를 destroy()하는 useEffect를 만들었다 const tmap = useRef(null) useEffect(() => { console.log('useEffect') tmap.current = new CongestionTmap(37.545555, 127.224, 16) tmap.current.addPolygon(polygon[0]) tmap.current.fitEdge() return () => { console.log('map', tmap.current) console.log('cleanUp') tmap.current.destroy() } }, [polygon]) return ( )..