2

I have stored latitude and longitude values in my object in Objectify (Google App Engine), but I don't know how to find a nearest location in Objectify.

I found a sample here but I'm also looking for tips.

Ryan A.
  • 411
  • 4
  • 13
My Talk
  • 19
  • 2
  • maybe relevant: https://stackoverflow.com/questions/25303582/how-to-do-customer-lat-long-place-search-in-radius-using-google-map-api/25305325#25305325 – Dan Cornilescu Aug 24 '17 at 03:44

1 Answers1

0

you are talking about Geospatial Queries which are yet not supported by the Google Cloud Datastore. This feature is still in alpha stadium. Please see the following post for this topic

Geospatial Query at Google App Engine Datastore

So you need to implement your logic. A possible solution would be to use Geohashes e.g.

https://github.com/davidmoten/geo

Michael Meyer
  • 2,179
  • 3
  • 24
  • 33
  • dont find sample with latude and longtude junit test from your git – My Talk Aug 24 '17 at 20:20
  • this is not my Git and the JavaDocs are available and I can see a lot of Unit Tests e.g. https://github.com/davidmoten/geo/blob/master/geo/src/test/java/com/github/davidmoten/geo/GeoHashTest.java – Michael Meyer Aug 25 '17 at 07:46