【问题标题】:Google Maps AuthenticationService denying maps loading in AngularJS appGoogle Maps AuthenticationService 拒绝在 AngularJS 应用程序中加载地图
【发布时间】:2014-06-17 11:28:09
【问题描述】:

在我的应用程序中实现 Angular Google 地图时遇到了一些基本问题。
起初我以为是我的应用程序代码,但这个 plunker 演示了同样的问题:

http://plnkr.co/edit/SWxqso?p=preview

这几乎就是此处的快速入门指南:http://angular-google-maps.org/use,由于某种原因,当我请求地图文件时,我会使用 Google 的 AuthenticationService。

这似乎与 Angular 相关,因为应用程序外部的类似代码在没有 API 密钥的情况下运行良好。我已经尝试了所有我能想到的方法(包括添加我的 API 密钥和将我的域添加到我在 Google 的 API 控制台)。

这里还有另一个非工作版本:pitwall.csoutham.com/#/circuit/adelaide(没有足够的声誉发布两个以上的链接)。

非常感谢任何指导。

【问题讨论】:

    标签: angularjs google-maps google-maps-api-3 angular-google-maps


    【解决方案1】:

    这是我昨天对 google-maps 实施问题的回答,jsfiddle 中也有一个工作示例

    AngularJS - load google map script async in directive for multiple maps

    【讨论】:

    【解决方案2】:

    @Chris Southam 我知道您已关闭,但为了后代,您的 plnkr 缺少 angular-google-maps 导入的关闭。请参阅此处更正的示例,http://plnkr.co/edit/qfhuW9?p=preview

    【讨论】:

    • 谢谢你,我很欣赏那个修复。我发现的新版本似乎“更轻”,并且不依赖于 lodash/underscore,所以我不禁觉得它更合适。
    猜你喜欢
    • 2015-08-13
    • 2016-10-11
    • 2021-04-30
    • 1970-01-01
    • 2017-04-10
    • 2013-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多