Uncaught ReferenceError: google is not defined

前端 未结 3 2041
再見小時候
再見小時候 2020-12-08 22:03

I want to use geolocation and direction function, but there is google is not defined error. the code is as below:

function loadScript() {
               


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 22:49

    Google is not defined mean that your google map libary is not loaded which mean you are on https or http and you are requesting via http ot https so change it to https or http .... mean if you are on http then

    
    

    mean if you are on https then

    
    

提交回复
热议问题