如何执行基于位置的搜索 [英] how to do location based search

查看:118
本文介绍了如何执行基于位置的搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要制定一个解决方案,将提供要根据城市和国家的用户的能力。用户应该有权请求,搜索结果不仅包括比赛为城市和国家的能力,而且还包括在25,50,100英里半径的比赛。我看到工地做这种类型的事情。这是怎么做的以及是否有供应商提供开放的API的呢?

I need to develop a solution that will provide the ability for a user to search based on a city and state. The user should have the ability to request that the search results include not just matches for that city and state, but also include matches in a 25, 50, 100 mile radius. I see that job sites do this type of thing. How is this done and are there vendors that provide open API's for it?

感谢

推荐答案

您将要开始的城市,州和邮编codeS数据库及其对应的经度和纬度。 这里到一个网站,你可以下载这样的数据库进行免费的链接。

You'll want to start with a database of cities, states and zip codes with their corresponding latitude and longitude. Here's a link to a site where you can download such a database for free.

接下来,您将需要一个算法来找出哪些城市/ ZIP codeS是城市/的X英里半径范围内压缩进入的人。 这里另一个链接应解释如何做到这一点。

Next you'll need an algorithm to find which cities/zip codes are within an X mile radius of the city/zip the person entered. Here's another link that should explain how to do that.

这篇关于如何执行基于位置的搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆