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

AMapSdk.init异步导致第一次打开地图白屏 #827

Open
Diff-sky opened this issue Jul 3, 2024 · 0 comments
Open

AMapSdk.init异步导致第一次打开地图白屏 #827

Diff-sky opened this issue Jul 3, 2024 · 0 comments

Comments

@Diff-sky
Copy link

Diff-sky commented Jul 3, 2024

AMapSdk.init(
Platform.select({
android: "c52c7169e6df23490e3114330098aaac",
ios: "186d3464209b74effa4d8391f441f14d",
})
);
如果在使用地图当前的组件useEffect里来初始化key,第一次打开地图时会白屏,这是由于key的设置异步导致的吗?
除了提前init Key之外,能优化一个AMapSdk.init的回调就更好啦

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

1 participant