邻近搜索基于纬度和经度
我想提出一个市场类型的应用程序,用户在其中输入产品细节和产品的地址,我现在GEO使用谷歌Geod codeR code这个地址为纬度和经度和我进一步处理这一信息纳入MySQL数据库。如果我为在附近搜索用户自定义半径接近搜索工作完美无瑕。但是我不能确定,我怎么会在一个国家的边界处理。我不希望从印度人们能够从巴基斯坦查看产品,这将证明一个灾难我的应用程序都是处于战争状态。任何建议,我怎么可以克服这一点。
I am making a market type application, in which users enter product details and product address, now I Geocode this address into latitude and longitude using Google Geodcoder and further I process this information into MySql Database. The proximity search is working flawless if I provide a user defined radius for searching in the vicinity. However I am not able to determine as to how will I handle it at the border of a country. I dont want people from India to be able to view a product from Pakistan, this will prove a disaster for my application as both are at war. Any Suggestions as to how can I overcome this.
我有一些其他的建议也于:http://dba.stackexchange.com/questions/39115/zip-based-search-in-mysql/39138?noredirect=1#comment69710_39138
I had some other suggestions too at: http://dba.stackexchange.com/questions/39115/zip-based-search-in-mysql/39138?noredirect=1#comment69710_39138
不过,我想最好的,这样做的最有效的方式。任何帮助将是非常美联社preciated。
However I want the best and the most efficient way of doing this. Any help would be highly appreciated.
您可以查看以下PDF和国家的限制,我想你可以通过包括 凡国家限制搜索到一个国家='XCountry的在您的搜索查询。
You can check the following PDF and for restriction of countries, I think you can restrict the search to a country by including the Where Country = 'XCountry' in your search query.