2016-11-08 63 views
-1

我試圖通過添加以下script標籤添加谷歌地圖在我angularjs應用: -在angularjs應用程序添加地圖

<script src="https://maps.googleapis.com/maps/api/js?key=[AddingMySecretKeyHere]&callback=initMap" async defer></script> 

,因爲我從https://developers.google.com/maps/documentation/javascript/adding-a-google-map

讀,但我得到以下錯誤,而一飲而盡建設它

[10:13:46] Starting 'custom-templates'... 
[10:13:47] Finished 'custom-less' after 29 ms 

events.js:160 
     throw er; // Unhandled 'error' event 
    ^
Error: Path G:\DemoProjects\firstWebApp\src\https:\maps.goo 
gleapis.com\maps\api\js not found! 
    at getFiles (G:\DemoProjects\firstWebApp\node_modules\g 
ulp-usemin\lib\blocksBuilder.js:64:15) 
    at module.exports (G:\DemoProjects\firstWebApp\node_mod 
ules\gulp-usemin\lib\blocksBuilder.js:111:22) 
    at Transform._transform (G:\DemoProjects\firstWebApp\no 
de_modules\gulp-usemin\index.js:16:22) 
    at Transform._read (G:\DemoProjects\firstWebApp\node_mo 
dules\gulp-usemin\node_modules\through2\node_modules\readable-stream\lib\_stream 
_transform.js:184:10) 
    at Transform._write (G:\DemoProjects\firstWebApp\node_m 
odules\gulp-usemin\node_modules\through2\node_modules\readable-stream\lib\_strea 
m_transform.js:172:12) 
    at doWrite (G:\DemoProjects\firstWebApp\node_modules\gu 
lp-usemin\node_modules\through2\node_modules\readable-stream\lib\_stream_writabl 
e.js:237:10) 
    at writeOrBuffer (G:\DemoProjects\firstWebApp\node_modu 
les\gulp-usemin\node_modules\through2\node_modules\readable-stream\lib\_stream_w 
ritable.js:227:5) 
    at Transform.Writable.write (G:\DemoProjects\ambuhelp-hospita 
l\node_modules\gulp-usemin\node_modules\through2\node_modules\readable-stream\li 
b\_stream_writable.js:194:11) 
    at write (G:\DemoProjects\firstWebApp\node_modules\viny 
l-fs\node_modules\readable-stream\lib\_stream_readable.js:623:24) 
    at flow (G:\DemoProjects\firstWebApp\node_modules\vinyl 
-fs\node_modules\readable-stream\lib\_stream_readable.js:632:7) 

我是新來的,所以無法確定哪裏出了問題!請幫助。

+0

請也共享代碼 –

+1

你不會在一飲而盡建立什麼呢? –

+0

downvote的原因是什麼(-1)你們可能是經驗豐富的或者是過分的,但我不是,因爲我剛剛開始學習這個狗屎.. –

回答

0

只使用

<script src="http://maps.google.com/maps/api/js?key=[AddingMySecretKeyHere]?sensor=false"></script> 

沒有<異步延遲>

+0

它給出了沒有異步延遲的同樣的錯誤信息。 –

相關問題