久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='BSk2L'></tfoot>
      <bdo id='BSk2L'></bdo><ul id='BSk2L'></ul>

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

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

      1. <legend id='BSk2L'><style id='BSk2L'><dir id='BSk2L'><q id='BSk2L'></q></dir></style></legend>
      2. 為什么選擇 HTML5 地理位置?

        Why HTML5 Geolocation?(為什么選擇 HTML5 地理位置?)

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

                  <tbody id='kuxVl'></tbody>
              • <small id='kuxVl'></small><noframes id='kuxVl'>

                <legend id='kuxVl'><style id='kuxVl'><dir id='kuxVl'><q id='kuxVl'></q></dir></style></legend>
              • <tfoot id='kuxVl'></tfoot>

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

                2. 本文介紹了為什么選擇 HTML5 地理位置?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  為什么 HTML5 地理位置可以讓您共享您的位置?使用地理位置的主要目的是什么,因為您也可以通過 IP 地址獲取位置.這兩種方法有什么區別嗎?

                  Why does HTML5 geolocation let you share your location? What is main purpose of using geolocation, as you can get the location with IP address as well. Is there any difference between these two methods?

                  我之所以問,是因為地理定位需要用戶的許可,并且也不適用于所有瀏覽器.

                  I'm asking because geolocation requires the user's permission and also doesn't work on all browsers.

                  推薦答案

                  HTML5 GeoLocation 往往比基于 IP 的 GeoLocation 更準確很多.

                  HTML5 GeoLocation tends to be much more accurate than IP-based GeoLocation.

                  基于 IP 的 GeoLocation 依賴于與 ISP 關聯的數據庫來確定您的位置.當您的 ISP 服務于非常大的區域并提供動態 IP 地址時,這將無法正常工作.今天在一個城鎮的地址可能在明天 100 英里之外.此外,這些數據庫通常不會經常更新.如果您的 ISP 出售 IP 塊或將它們轉移到新城鎮,數據庫可能仍會錯誤地認為您在其他地方.

                  IP-based GeoLocation depends on databases associated with ISPs to figure out where you are. This doesn't work well when your ISP services a very large area and gives out dynamic IP addresses. The address in one town today might be 100 miles away tomorrow. Furthermore, those databases are usually not updated frequently. If your ISP sells off blocks of IPs or moves them to a new town, the database may still incorrectly think you're somewhere else.

                  HTML5 位置使用瀏覽器提供的服務來確定您的位置.如果您的計算機內置 GPS(例如在許多移動設備和某些筆記本電腦上),它會準確地知道您在哪里.這使得它對于具有導航或位置組件的 web 應用程序更加有用.對于沒有 GPS 的設備,它通??梢愿鶕浇阎臒o線信號和其他因素提供非常好的近似值,例如跟蹤您的計算機在連接??到互聯網時經過的路由器.確切的實現取決于計算機、可用的硬件以及瀏覽器選擇執行操作的方式.

                  HTML5 location uses services provided by your browser to figure out where you are. If your computer has GPS built-in (such as on many mobile devices and some laptops), it will know exactly where you are. This makes it much more useful for webapps that have a navigation or location component. For devices without GPS, it can often provide a very good approximation based on nearby known wireless signals and other factors, such as tracing what routers your computer goes through when connecting to the internet. The exact implementation depends on the computer, what hardware it has available, and how the browser chooses to do things.

                  例如,當我查看基于 IP 的定位服務時,它顯示我在我所居住的同一地區的一個特定大城市,但它實際上大約在 50 英里之外.當我使用基于 HTML5 位置的服務來確定我在哪里時,它只相差大約 20 個blocks.

                  For example, when I check an IP-based location service, it says that I'm in a particular large city in the same general area that I live in, but it's actually about 50 miles away. When I use an HTML5 location based service to figure out where I am, it's only off by about 20 blocks.

                  如果您正在開發需要位置數據的網絡應用程序,嘗試盡可能使用 HTML5 GeoLocation.設置回退,以便 如果 HTML5 定位失敗,您可以改用 GeoIP 解決方案.這樣,您將在受支持的瀏覽器和設備上獲得最佳準確性,但在 HTML5 數據不可用時仍然有適當的解決方案.

                  If you're developing a webapp which needs location data, try using HTML5 GeoLocation if at all possible. Set up a fallback, so that if HTML5 location fails, you can use an GeoIP solution instead. This way, you will get optimal accuracy on supported browsers and devices, but will still have a solution in place when the HTML5 data are not available.

                  如果您使用了來自 Google Code 的 geolocation-javascript 項目,您可以使用以下代碼:

                  If you used the geolocation-javascript project from Google Code, you could use the following code:

                  //determine if device has geo location capabilities
                  if(geo_position_js.init()){
                     geo_position_js.getCurrentPosition(success_callback,error_callback);
                  }
                  else{
                     // use an AJAX request to look up the location based on IP address
                  }
                  

                  這篇關于為什么選擇 HTML5 地理位置?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                  In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                  How to reload the ion-page after pop() in ionic2(如何在 ionic2 中的 pop() 之后重新加載離子頁面)
                  Javascript Convert an URL to a BASE64 Image(Javascript 將 URL 轉換為 BASE64 圖像)
                  Input validation with pattern Angular 2(使用模式 Angular 2 進行輸入驗證)
                  How to change the css class name dynamically in angular 2(如何在角度2中動態更改css類名)
                  1. <small id='tARIA'></small><noframes id='tARIA'>

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

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

                        • <tfoot id='tARIA'></tfoot>

                          <legend id='tARIA'><style id='tARIA'><dir id='tARIA'><q id='tARIA'></q></dir></style></legend>
                            <tbody id='tARIA'></tbody>

                            主站蜘蛛池模板: 久久成人一区 | 中文字幕亚洲一区 | 国产精品免费视频一区 | www.国产日本| 2019天天操| 久艹网站 | www.久久影视 | 一本色道精品久久一区二区三区 | 久久99精品久久久久久琪琪 | 一区二区三区视频在线观看 | 亚洲一区二区三区四区五区中文 | 成人午夜电影在线观看 | 91九色在线观看 | 青青草精品视频 | a级毛片国产 | 国产免费视频 | 91在线看片 | 日本在线播放一区二区 | 蜜桃免费一区二区三区 | 亚洲精品永久免费 | 久久久久91 | 欧美日韩一区二区在线 | 欧美一区二区三区在线看 | 国产成人免费视频网站视频社区 | 久久久精品视频一区二区三区 | 久久精品成人一区 | 91一区二区三区 | 激情国产 | 激情福利视频 | 成人在线电影在线观看 | 美女视频. | 在线免费观看a级片 | 天天色综| 2021狠狠干| 久视频在线观看 | 亚洲黄色在线 | 精品欧美一区二区在线观看欧美熟 | 亚洲精品在线视频 | 欧美精品一区二区蜜桃 | 久久精品视频一区二区 | 在线视频一区二区 |