谷歌地图不加载第二次 - AngularJS [英] Google Maps doesn't load the 2nd time - AngularJS
问题描述
我使用的GoogleMap的API(角谷歌-地图JS封装)和我有一个非常怪异的行为。
I'm using the GoogleMap API ('angular-google-maps' js package) and I have a very weird behavior.
我第一次加载它,我得到加载,喜欢这里的全图:
The first time I load it, i get the full map loaded, like here:
然后我关闭对话框,然后重新打开它,我看到这一点:
Then i close the dialog and reopen it, i see this:
请记住,地图显示为另一对话框顶部的对话框。
Keep in mind, that the map is displayed as a dialog on top of another dialog.
任何想法?
推荐答案
如果您使用的是谷歌角地图模块,您必须添加刷新属性的GoogleMap的元素。
If you are using Angular Google Map module you must add the refresh attribute to the googlemap element.
由于它写模块文档中:
刷新=前pression - 前pression,如果它的值为true,将触发地图刷新。有用的地图最初是隐藏的。
refresh = "expression" - Expression which, if it evaluates to true, will trigger a map refresh. Useful when the map is initially hidden.
这篇关于谷歌地图不加载第二次 - AngularJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!