生成 GoogleMaps API 时出错
我已经成功完成了使用 GoogleMaps API v3 的上一个项目。 但现在,地图无缘无故不再生成。
包含所有地图控件的窗口已正确打开,但地图 本身不是。它只显示灰屏。
在调用 google.maps 函数之前脚本没有错误 之后也没有错误!
有人可以尝试帮助我解决这个问题吗?
无论如何,谢谢。
I've finished my last project that uses GoogleMaps API v3 sucessfully.
But now, with no reasons the map is not being generated anymore.
The window with all map controls is opened correctly but the map
itself is not. It shown only a gray screen.
There is no errors on the script before calls google.maps function and
there is no errors after it too!
Can anyone try to help me with this issue?
Thx anyway.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我在 Jquery UI 对话框中使用 GoogleMaps API 时,我遇到了类似的问题,地图 div 会是灰色的。我通过在打开对话框时调整地图大小来纠正此问题。我也在使用 GMAP3 Jquery 插件。
这是调整大小的功能:
如果您没有使用 GMAP3 Jquery 插件,您可以尝试以下方法来调整地图大小:
I had a similar problem when I used GoogleMaps API in a Jquery UI Dialog, the map div would be gray. I corrected this problem by resizing the map when I opened the Dialog. I am also using the GMAP3 Jquery plugin.
Here is the resizing function:
If you do not use the GMAP3 Jquery plugin, you can try this to resize the map: