邮政编码邻近搜索

发布于 2024-10-23 15:12:11 字数 281 浏览 7 评论 0 原文

我有大约 20 个活动(如果这有影响的话,以英国为基地)。

我还将在页面上提供一个表格,人们可以在其中登记参加其中一项活动的兴趣。提交此表格后,他们将看到距离他们最近的活动地点。

问题是我不知道该怎么做。是否有任何链接到谷歌地图的东西可以实现这一点,或者我是否需要购买可以实现这一点的东西......或者基于我只有少量事件的事实,它可以在服务器端相当容易地实现。

如果需要在服务器端完成,我正在运行 asp.net (vb) 或者我相当熟悉 javascript/jquery。

谢谢

I have about 20 events (UK based if that makes a difference).

I will also have a form on a page where people can register their interest in attending one of these events. After they have submitted this form, they will be shown the location of the closest event to them.

Trouble is I have no idea how to do this. Is there anything linked to google maps that can achieve this or do I need to buy something that does this... or can it be fairly easily achieved server side based on the fact I only have a small number of events.

If it needs to be done server side I'm running asp.net (vb) or I'm fairly up to speed with javascript/jquery.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

陌上芳菲 2024-10-30 15:12:11

您最有可能需要的是哈维辛公式数学来计算距客户位置和活动的距离。就像卢克(Luke)发现的那样,支持空间索引查询的数据库可以为您提供很大帮助。

Most likely what you want is the harvesine-formule-math to calculate the distance from your client's location and your event. Like Luke worked it out a spatial index-query enabled database can help you greatly.

左耳近心 2024-10-30 15:12:11

看看 Howard van Rooijen 的这篇文章:

http://howard.vanrooijen.co.uk/2010/05/05/ordnance-surveys-gb-postcode-to-longitude-latitude-dataset/

他已接受该条例调查邮政编码数据并以各种可用形式提供(SQL Server 2005、2008 和 Mongo)。然后,您可以针对此数据在服务器端运行空间查询,以查找事件邮政编码的给定范围内有多少个邮政编码。

Take a look at this post by Howard van Rooijen:

http://howard.vanrooijen.co.uk/2010/05/05/ordnance-surveys-gb-postcode-to-longitude-latitude-dataset/

He has taken the Ordinance Survey postcode data and made it available in various usable forms (SQL Server 2005, 2008 and Mongo). You can then run a spatial query server-side against this data to find how many postcodes are within a given range of the event postcode.

往事随风而去 2024-10-30 15:12:11

我写了一个网站&免费的 API,可以为您执行此操作(如果有任何用途) - http://postcod.es

I wrote a site & free API that does this for you if it's any use - http://postcod.es

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文