const [infoWindowPosition, setInfoWindowPosition] = useState( new AMap.LngLat(121.437, 31.026) );
报错信息
ReferenceError: AMap is not defined at MapPage (http://localhost:3000/static/js/bundle.js:2243:107) at renderWithHooks (http://localhost:3000/static/js/bundle.js:92643:22) at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:95929:17) at beginWork (http://localhost:3000/static/js/bundle.js:97225:20) at beginWork$1 (http://localhost:3000/static/js/bundle.js:102188:18) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:101457:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:101380:9) at renderRootSync (http://localhost:3000/static/js/bundle.js:101353:11) at recoverFromConcurrentError (http://localhost:3000/static/js/bundle.js:100845:24) at performSyncWorkOnRoot (http://localhost:3000/static/js/bundle.js:101054:24)
const [infoWindowPosition, setInfoWindowPosition] = useState( new AMap.LngLat(121.437, 31.026) );
报错信息
ReferenceError: AMap is not defined at MapPage (http://localhost:3000/static/js/bundle.js:2243:107) at renderWithHooks (http://localhost:3000/static/js/bundle.js:92643:22) at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:95929:17) at beginWork (http://localhost:3000/static/js/bundle.js:97225:20) at beginWork$1 (http://localhost:3000/static/js/bundle.js:102188:18) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:101457:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:101380:9) at renderRootSync (http://localhost:3000/static/js/bundle.js:101353:11) at recoverFromConcurrentError (http://localhost:3000/static/js/bundle.js:100845:24) at performSyncWorkOnRoot (http://localhost:3000/static/js/bundle.js:101054:24)
版本信息
@uiw/react-amap": "^4.0.2", "react": "^18.2.0",
想问一下是哪里没有引入吗?