谷歌地图错误 - 未捕获的Ref​​erenceError:不定义谷歌 - 自耕农 [英] google map error - Uncaught ReferenceError: google is not defined - yeoman

查看:159
本文介绍了谷歌地图错误 - 未捕获的Ref​​erenceError:不定义谷歌 - 自耕农的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是自耕农离子框架我试着添加谷歌地图到我的app.the的问题是,每一次我跑一次咕噜服务的index.html脚本删除了。所以我跑了这一点:凉亭安装--save角谷歌,地图,因为它除了index.html的写了一些其他的文件脚本解决了这个问题。唯一的问题是,当我跑咕噜服务againt我得到一个不同势错误,从那以后我就想不出什么我做错了...

on the yeoman-ionic framework i've tried to add google map to my app.the problem was that every time i ran grunt serve the index.html scripts got deleted. so i've ran this:bower install --save angular-google-maps and the problem solved since it wrote the scripts on some other file in addition to index.html. the only problem is when i ran grunt serve againt i got a diffrent error and ever since then i just can't figure out what i am doing wrong...

错误:

未捕获的Ref​​erenceError:没有定义谷歌

Uncaught ReferenceError: google is not defined

我认为这是与一些噶玛配置文件,虽然我不知道这是什么。试图解决这个问题了几个小时,可能不知道这一点......

i think it has something to do with some karma config file although i have no idea what this is. tried to solve this for a couple of hours and couldn't figure this out...

推荐答案

我得到这个错误了。它原来是与在其中我装我的脚本文件的顺序。尝试加载在这个命令脚本文件:

I was getting that error too. It turned out to be related to the order in which I loaded my script files. try loading your script files in this order:

<script src='//maps.googleapis.com/maps/api/js?sensor=false'></script>
<script src='/path/to/underscore[.min].js'></script>
<script src='/path/to/lodash.underscore[.min].js'></script>
<script src='/path/to/angular-google-maps[.min].js'></script>

最好的!

这篇关于谷歌地图错误 - 未捕获的Ref​​erenceError:不定义谷歌 - 自耕农的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆