<tfoot id='rks4r'></tfoot>
  • <small id='rks4r'></small><noframes id='rks4r'>

      • <bdo id='rks4r'></bdo><ul id='rks4r'></ul>

      1. <legend id='rks4r'><style id='rks4r'><dir id='rks4r'><q id='rks4r'></q></dir></style></legend>
        <i id='rks4r'><tr id='rks4r'><dt id='rks4r'><q id='rks4r'><span id='rks4r'><b id='rks4r'><form id='rks4r'><ins id='rks4r'></ins><ul id='rks4r'></ul><sub id='rks4r'></sub></form><legend id='rks4r'></legend><bdo id='rks4r'><pre id='rks4r'><center id='rks4r'></center></pre></bdo></b><th id='rks4r'></th></span></q></dt></tr></i><div id='rks4r'><tfoot id='rks4r'></tfoot><dl id='rks4r'><fieldset id='rks4r'></fieldset></dl></div>
      2. 未捕获的 ReferenceError:未定义 google

        时间:2023-09-06

          1. <tfoot id='sdZgc'></tfoot>
              <tbody id='sdZgc'></tbody>
              <bdo id='sdZgc'></bdo><ul id='sdZgc'></ul>

              <small id='sdZgc'></small><noframes id='sdZgc'>

              <legend id='sdZgc'><style id='sdZgc'><dir id='sdZgc'><q id='sdZgc'></q></dir></style></legend>

                • <i id='sdZgc'><tr id='sdZgc'><dt id='sdZgc'><q id='sdZgc'><span id='sdZgc'><b id='sdZgc'><form id='sdZgc'><ins id='sdZgc'></ins><ul id='sdZgc'></ul><sub id='sdZgc'></sub></form><legend id='sdZgc'></legend><bdo id='sdZgc'><pre id='sdZgc'><center id='sdZgc'></center></pre></bdo></b><th id='sdZgc'></th></span></q></dt></tr></i><div id='sdZgc'><tfoot id='sdZgc'></tfoot><dl id='sdZgc'><fieldset id='sdZgc'></fieldset></dl></div>
                • 本文介绍了未捕获的 ReferenceError:未定义 google的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想使用地理定位和方向功能,但是有 google is not defined 错误.代码如下:

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

                  function loadScript() {
                              var script = document.createElement('script');
                              script.type = 'text/javascript';
                              script.src = "https://maps.googleapis.com/maps/api/js?key=mykey&sensor=true" + "&callback=initialize";
                              document.body.appendChild(script);
                          }
                  

                  好像loadScript不行!

                  It seems that the loadScript does not work!

                  var mapOptions = {
                                  zoom : 13,
                                  mapTypeId : google.maps.MapTypeId.ROADMAP
                              };
                              map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
                  

                  错误从这里跳出来.有谁知道如何弄清楚吗?我需要使用key来获取地理位置服务,所以我不能使用简单的

                  The error jumps out from here. Is anyone who know how to figure it out? I need to use key to get the geolocation service, so I cannot use simple

                  <script src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>
                  

                  推荐答案

                  如果你们在控制台中遇到错误,那么这里是我应用的简单解决方案.

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

                  包括给定顺序的脚本文件..

                  include the script files in given sequence..

                  <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
                  <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
                  

                  您必须首先包含maps.googleapis.com/maps/api/js?sensor=false",然后使用 jquery 库并将其从两者下方删除(它会起作用.)我希望它一定会起作用.

                  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.

                  这篇关于未捕获的 ReferenceError:未定义 google的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:W3C 地理定位 API 在 Chrome 中不起作用 下一篇:地理位置 HTML5 enableHighAccuracy True 、 False 还是最佳

                  相关文章

                  最新文章

                  1. <legend id='59ETY'><style id='59ETY'><dir id='59ETY'><q id='59ETY'></q></dir></style></legend>
                    • <bdo id='59ETY'></bdo><ul id='59ETY'></ul>
                  2. <small id='59ETY'></small><noframes id='59ETY'>

                    1. <i id='59ETY'><tr id='59ETY'><dt id='59ETY'><q id='59ETY'><span id='59ETY'><b id='59ETY'><form id='59ETY'><ins id='59ETY'></ins><ul id='59ETY'></ul><sub id='59ETY'></sub></form><legend id='59ETY'></legend><bdo id='59ETY'><pre id='59ETY'><center id='59ETY'></center></pre></bdo></b><th id='59ETY'></th></span></q></dt></tr></i><div id='59ETY'><tfoot id='59ETY'></tfoot><dl id='59ETY'><fieldset id='59ETY'></fieldset></dl></div>
                      <tfoot id='59ETY'></tfoot>