Reputation: 330
As per geocoder official doc:
Distance between Eiffel Tower and Empire State Building
Geocoder::Calculations.distance_between([47.858205,2.294359], [40.748433,-73.985655])
=> 3619.77359999382 # in configured units (default miles)
def geodistance
render json: Geocoder::Calculations.distance_between([47.858205,2.294359], [40.748433,-73.985655])
end
In my case I am getting the value to be:
=> 3648.3340765758867
Unit configurations are unchanged, not sure what can go wrong!
Upvotes: 0
Views: 118