Uncaught ReferenceError: google is not defined

前端 未结 3 2047
再見小時候
再見小時候 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:35

    If you people are getting Error in console then here is the simple solution that I applied.

    include the script files in given sequence..

    
    
    

    You must first include 'maps.googleapis.com/maps/api/js?sensor=false' first then go for jquery library and remove it from below both (it will work.) I hope it will definitely work.

提交回复
热议问题