Skip to content

Add js geoquery sorted parameter #529

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

Merged

Conversation

mtrezza
Copy link
Member

@mtrezza mtrezza commented Jun 13, 2018

Depending on parse-community/Parse-SDK-JS#582.

Do not merge before JS PR.

@flovilmart
Copy link
Contributor

@dplewis now that it's merged into the server and JS, should we merge it here as well?

@@ -40,7 +40,40 @@ query.find({

At this point `placesObjects` will be an array of objects ordered by distance (nearest to farthest) from `userGeoPoint`. Note that if an additional `ascending()`/`descending()` order-by constraint is applied, it will take precedence over the distance ordering.

To limit the results using distance, check out `withinMiles`, `withinKilometers`, and `withinRadians`.
To limit the results using distance, check out `withinMiles`, `withinKilometers`, and `withinRadians`. Use the `sorted` parameter to sort the results by distance ascending.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the sorted parameter to sort the results by distance ascending.

suggestion: By default, the results will come back sorted by their distance and you can disable it with the sorted parameter.

@flovilmart flovilmart merged commit 0eda14c into parse-community:gh-pages Aug 13, 2018
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

Successfully merging this pull request may close these issues.

2 participants