【问题标题】:Finding a nearest location by using Datastore使用 Datastore 查找最近的位置
【发布时间】:2017-08-23 20:04:40
【问题描述】:

我在 Objectify (Google App Engine) 中的对象中存储了纬度和经度值,但我不知道如何在 Objectify 中找到最近的位置。

我找到了一个示例 here,但我也在寻找提示。

【问题讨论】:

标签: java google-app-engine google-cloud-datastore


【解决方案1】:

您说的是 Google Cloud Datastore 尚不支持的地理空间查询。此功能仍处于 alpha 体育场。有关此主题,请参阅以下帖子

Geospatial Query at Google App Engine Datastore

所以你需要实现你的逻辑。一个可能的解决方案是使用 Geohashes,例如

https://github.com/davidmoten/geo

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-01-04
  • 2016-06-08
  • 2011-09-09
相关资源
最近更新 更多