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

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

          <bdo id='XEzrF'></bdo><ul id='XEzrF'></ul>
        <legend id='XEzrF'><style id='XEzrF'><dir id='XEzrF'><q id='XEzrF'></q></dir></style></legend>

        <tfoot id='XEzrF'></tfoot>

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

        地理位置 API 和在半徑內查找用戶

        Geo Location API and finding user within a radius(地理位置 API 和在半徑內查找用戶)

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

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

                  本文介紹了地理位置 API 和在半徑內查找用戶的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個 Java 應用程序,我想找出訪問者的位置.API 會給我一個訪客的郵政編碼,然后基于該郵政編碼,我會找到一個查詢并在我的應用程序中獲取 25/50 英里半徑內的用戶.或者,訪問者可以輸入他們感興趣的郵政編碼,應用程序應該返回半徑為 x 英里的用戶.對于在系統中注冊的用戶,我們只有他們的郵政編碼.我查看了一些選項,但沒有找到確切的解決方案.我不想下載郵政編碼數據庫并維護它們.我不認為 Google API 支持這種東西.

                  I have a Java application and I would like to find out the location of a visitor. The API would give me a the zip code of visitor and then based on that zip code, I will find fire a query and get users in my application within 25/50 mile radius. Alternatively visitor can type in the zip code of their interest and application should return users withing x mile of radius. For the users who are registered in the system, we have only their zip code. I have looked around some options but not found the exact solution. I do not want to download the database of zip code and maintain them. I do not think Google API support this kind of stuff.

                  推薦答案

                  我找不到任何提供 API 的服務.經過大量研究,我發現您必須將郵政編碼及其緯度和經度位置下載到表格中.然后計算要搜索的半徑內的坐標.這是對我幫助很大的網站.http://www.dougv.com/2009/03/27/getting-all-zip-codes-in-a-given-radius-from-a-known-point-zip-code-via-php-and-mysql/

                  I could not find any service which offers API . After much research i found that you will have to download zip codes along with their latitude and longitude positions into a table. Then calculate co ordinates within the radius you want to search. This is the website which helped me a lot. http://www.dougv.com/2009/03/27/getting-all-zip-codes-in-a-given-radius-from-a-known-point-zip-code-via-php-and-mysql/

                  如果你真的不想使用 php,這里是 java 中的計算

                  Here is the calculation in java if you really if you do not want to work with php

                  //這您將通過根據郵政編碼查詢數據庫來獲得雙緯度 = Double.parseDouble(zipCode.getLatitude());雙經度 = Double.parseDouble(zipCode.getLongitude());

                  //this you will get by querying the database against the zip code Double latitude = Double.parseDouble(zipCode.getLatitude()); Double longitude = Double.parseDouble(zipCode.getLongitude());

                      Double latN =Math.asin(
                              Math.sin(Math.toRadians(latitude)) * Math.cos(distance/radius) + 
                              Math.cos(Math.toRadians(latitude)) * Math.sin(distance/radius) * Math.cos(Math.toRadians(0)));
                  
                  
                      Double latS =Math.asin(
                              Math.sin(Math.toRadians(latitude)) * Math.cos(distance/radius) + 
                              Math.cos(Math.toRadians(latitude)) * Math.sin(distance/radius) * Math.cos(Math.toRadians(180)));
                  
                  
                      Double longE = Math.toRadians(longitude) + 
                                      Math.atan2(
                                              Math.sin(Math.toRadians(90)) * Math.sin(distance/radius)* Math.cos(Math.toRadians(latitude)) 
                              , Math.cos(Math.toRadians(distance/radius)) - Math.sin(Math.toRadians(latitude))* Math.sin(Math.toRadians(latN)) );
                  
                      Double longW = Math.toRadians(longitude) + 
                      Math.atan2(
                                      Math.sin(Math.toRadians(270)) * Math.sin(distance/radius)* Math.cos(Math.toRadians(latitude)) 
                                  , Math.cos(Math.toRadians(distance/radius)) - Math.sin(Math.toRadians(latitude))* Math.sin(Math.toRadians(latN)) );
                  
                      System.out.println("Latutude N "+Math.toDegrees(latN) +" Latitide S "+Math.toDegrees(latS) +">>> Longitude E "+Math.toDegrees(longE) +" Longitude W "+Math.toDegrees(longW));
                  

                  這篇關于地理位置 API 和在半徑內查找用戶的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

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

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

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

                            主站蜘蛛池模板: 日本精品一区 | 免费观看一区二区三区毛片 | www.中文字幕.com | 欧美一区二区小视频 | 久久久久久中文字幕 | 亚洲高清成人在线 | 亚洲精品国产一区 | 国产一区不卡 | 久久久久国产一区二区三区四区 | 日韩h| 欧美高清视频一区 | 女朋友的闺蜜3韩国三级 | 请别相信他免费喜剧电影在线观看 | 欧美日韩精品久久久免费观看 | 国产欧美精品 | 97久久精品午夜一区二区 | 亚洲精品国产一区 | 亚洲高清在线视频 | 亚洲成人99 | 国产精品一区二区av | 欧美激情久久久 | 伊人久久一区二区 | 男人天堂av网| 亚洲一区二区三区四区在线观看 | 欧美日韩综合视频 | 在线免费黄色 | 成人免费在线播放视频 | 国产精品99久久久久久人 | 亚洲一级在线 | 欧美日韩一区二区在线播放 | 久精品久久| 精品一区二区在线观看 | 亚洲一区二区精品视频 | 精品国产乱码久久久久久a丨 | a级在线免费观看 | 成人在线不卡 | 91tv在线观看 | 美国a级毛片免费视频 | 国产日韩欧美一区 | 中文字幕视频在线 | 亚洲色图图片 |