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

    2. <tfoot id='8P9x1'></tfoot>

      <small id='8P9x1'></small><noframes id='8P9x1'>

        未经许可的地理定位

        时间:2023-09-07

            <bdo id='hN9yP'></bdo><ul id='hN9yP'></ul>

                1. <legend id='hN9yP'><style id='hN9yP'><dir id='hN9yP'><q id='hN9yP'></q></dir></style></legend>
                  <i id='hN9yP'><tr id='hN9yP'><dt id='hN9yP'><q id='hN9yP'><span id='hN9yP'><b id='hN9yP'><form id='hN9yP'><ins id='hN9yP'></ins><ul id='hN9yP'></ul><sub id='hN9yP'></sub></form><legend id='hN9yP'></legend><bdo id='hN9yP'><pre id='hN9yP'><center id='hN9yP'></center></pre></bdo></b><th id='hN9yP'></th></span></q></dt></tr></i><div id='hN9yP'><tfoot id='hN9yP'></tfoot><dl id='hN9yP'><fieldset id='hN9yP'></fieldset></dl></div>
                2. <tfoot id='hN9yP'></tfoot>
                3. <small id='hN9yP'></small><noframes id='hN9yP'>

                    <tbody id='hN9yP'></tbody>
                  本文介绍了未经许可的地理定位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我注意到现代基于 html5 的地理位置总是询问用户你想与这个网站分享你的位置吗?".这很好,但我知道还有其他途径可以尝试确定棒球场的地理位置,而无需请求此许可.如果我记得,这些服务使用 ip 数据库来尝试跟踪地理定位信息并将其提供给网络应用程序.

                  Ive noticed that modern html5 based geolocation always asks the user "do you want to share your location with this website?". Which is fine, but I know there are other routes of trying to determine a ballpark geolocation without having to request this permission. If I recall, these services uses ip databases to try to track geolocaiton info and provide it to a web app.

                  因此,在我的网站中,我想在不请求地理定位许可的情况下对用户的邮政编码进行最佳猜测".最简单和/或最好的方法是什么?

                  So, in my website I would like to get a "best guess" at the user's zip code, without the geolocation permission being requested. What's the simplest and/or best method of doing this?

                  推荐答案

                  IP 地理位置不太准确,但您不需要用户许可.http://ipinfo.io API(这是我的服务)使它变得非常简单.这是一个 jQuery 示例:

                  IP geolocation is less accurate, but you don't need user permission for it. The http://ipinfo.io API (which is my service) makes it extremely simple. Here's a jQuery example:

                  $.get("http://ipinfo.io", function(response) {
                      console.log(response.city, response.region, response.country);
                  }, "jsonp");
                  

                  此处提供更多详细信息.

                  这篇关于未经许可的地理定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:舍入经纬度以在 Google 地图中显示大致位置 下一篇:测试是否已授予 html5 地理定位权限

                  相关文章

                  最新文章

                  1. <tfoot id='OPyN9'></tfoot>

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

                    <legend id='OPyN9'><style id='OPyN9'><dir id='OPyN9'><q id='OPyN9'></q></dir></style></legend>
                      <bdo id='OPyN9'></bdo><ul id='OPyN9'></ul>
                    1. <small id='OPyN9'></small><noframes id='OPyN9'>