Closed hcyildirim closed 5 years ago
Hi, I want to show the distance between the locations that exist in the database of latitude and longitude values I sent to the query. How can we access this distance information?
example:
@locations = Location.within(5, :origin => @somewhere)
distance value should be calculated by @somewhere coordinates and returns like below:
@somewhere
{ "data": [ { "name": "Paris", "distance": "200 meters" }, { "name": "New York", "distance": "2000 meters" } ] }
https://stackoverflow.com/questions/51184453/how-can-we-access-distance-field-on-calculated-ar-instances
There is a patch in https://github.com/geokit/geokit-rails/issues/56
Hi, I want to show the distance between the locations that exist in the database of latitude and longitude values I sent to the query. How can we access this distance information?
example:
@locations = Location.within(5, :origin => @somewhere)
distance value should be calculated by
@somewhere
coordinates and returns like below:https://stackoverflow.com/questions/51184453/how-can-we-access-distance-field-on-calculated-ar-instances