Uncaught referenceError google is not defined

前端 未结 2 622
逝去的感伤
逝去的感伤 2020-12-12 03:34

Please help me debug why Chrome is not recognizing google. I get this error:

Uncaught ReferenceError: google is not defined

2条回答
  •  醉梦人生
    2020-12-12 03:46

    You shouldn't put your google maps event in $(document).ready(); since window.load already registers an event listener and that should be enough.

    Your google maps script tag should also be above your JavaScript code and the event listener should also be moved beneath the function.

    
    
    
    

    Next time you should read the documentation more thoroughly.

提交回复
热议问题