Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance sorting takes no effect. #5

Open
pasine opened this issue Dec 20, 2010 · 0 comments
Open

Distance sorting takes no effect. #5

pasine opened this issue Dec 20, 2010 · 0 comments

Comments

@pasine
Copy link

pasine commented Dec 20, 2010

I've noticed that:

@nearest_pois = Poi.within(radius, :units => :km, :origin => [lat,lng], :order => 'distance ASC').limit(limit)

and

@nearest_pois = Poi.within(radius, :units => :km, :origin => [lat,lng], :order => 'distance DESC').limit(limit)

gives the same result.
It's like sorting has no effect.
This is my Poi configuration:
acts_as_mappable :default_units => :kms,
:default_formula => :sphere,
:distance_field_name => :distance,
:lat_column_name => :lat,
:lng_column_name => :lng

Is there something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant