Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: AMap is not defined #257

Closed
pyb0924 opened this issue Nov 6, 2022 · 1 comment
Closed

ReferenceError: AMap is not defined #257

pyb0924 opened this issue Nov 6, 2022 · 1 comment

Comments

@pyb0924
Copy link

pyb0924 commented Nov 6, 2022

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",

想问一下是哪里没有引入吗?

@jaywcjlove
Copy link
Member

@pyb0924 pyb0924 closed this as completed Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants