像 Groupon 这样的网站如何根据其进行交易的城市来进行地理定位?

发布于 2024-11-02 11:28:06 字数 184 浏览 1 评论 0原文

假设您从加利福尼亚州阿古拉山 (Agoura Hills) 的入口点访问 Groupon - Groupon 将如何将该城镇引用到最近有优惠的城市(例如洛杉矶)并选择该城市作为最近的城市?

它是否从该位置获取纬度/经度并计算与所有可用城市的距离,选择最短的?如果是这样,您可以在哪里获取每个城市的纬度/经度数据或用于此目的的开放 API?

Say you visit Groupon from the entry point Agoura Hills, CA - how would Groupon go about referencing that town to the nearest city that has deals (like Los Angeles) and choosing that as the closest?

Is it grabbing lat/long from the location and calculating the distance from all available cities, choosing the shortest? If so, where can you get lat/long data like that for each city or an open api to use for this purpose?

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

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

发布评论

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

评论(1

寂寞清仓 2024-11-09 11:28:06

Groupon 似乎使用 Limelightnetworks 作为他们的 CDN 提供商,并且大多数 CDN 由于其分布式特性而拥有某种地理位置数据库,可以映射来自该地区的请求。在 CDN 手中,这些信息很容易,并且站点可以进一步使用该信息。
DNS 所需要的只是以某种方式通知服务器,这并不是一个新概念。

还有一个 地理定位 API 规范,它允许浏览器/客户端将有关用户位置的信息发送到服务器(服务器可以使用该信息进行自定义)。这些因素会影响 DNS、无线 AP 等因素。但这仍处于草案阶段,一些谷歌服务使用它,并且也需要浏览器支持。

Groupon seems to use limelightnetworks as their CDN provider and most CDNs due to their distributed nature having some kind of geo-location database which they can map the request which is coming from the region. At the CDN's hands those information is easy, and site can be work with that information further.
All that would be required is someway for the DNS to inform the server and this is not a new concept.

There is a also a geolocation API spec, which would allow browsers/clients to send information about the users location to the server (which the server can use for customization). Those act number of factors such as DNS, your wireless AP, etc. But that is still in draft stage and some google services use it and it requires browser support too.

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