Geocoder Near 方法是否对 google 进行地理编码 api 调用

发布于 2024-12-28 23:48:15 字数 288 浏览 7 评论 0原文

我通过从客户端地理编码获取经度/纬度来将所有位置信息(经度和纬度)存储在我的数据库中,以避免 2500 最大地理编码每日限制。

我只是想确认,在提供经度和纬度时,使用geocoder gem 提供的near 方法不会对Google Geocoding api 进行外部调用。

例如:

位置.near([37.77,-122.41], 15)

位置模型具有已存储的每个位置的纬度和经度,因此不需要进行外部调用。正确的?

谢谢!

I'm storing all my location info (longitude and latitudes) in my database by getting the long/lat from client side geocoding to avoid the 2500 max geocoding daily limit.

I just want to confirm that using the near method provided by the geocoder gem when longitude and latitudes are provided does not make an external call to the Google Geocoding api.

For example:

Location.near([37.77, -122.41], 15)

where the location model has latitude and longitude for each location already stored should not have any need to make an external call. Right?

Thanks!

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

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

发布评论

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

评论(1

琉璃繁缕 2025-01-04 23:48:15

它必须对“加利福尼亚州旧金山”进行地理编码才能找出其经度和纬度。然后使用它们创建 sql 查询,该查询将能够获取该信息。

更新:如果您使用 Lat 和 Lng,它不会查询 Google Apis。

It has to geocode "San Franscisco, CA" to figure out their longitude and latitude. Then using those it creates the sql query which will be able to get that information.

Update: If you are using Lat and Lng, it won't query Google Apis.

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