1

I think I've found a bug in the pasre.com javascript Geo Queries API. I'm constructing a query like so:

var query = new Parse.Query("Location");
query.near("center", parseLocation);
query.withinMiles(15.0);
query.limit(10);
return query.find().then(function (locations) { ... });

When I execute this query I get the following error:

Failed location lookup: 102 $maxDistance needs float

And when I remove the withinMiles line it works fine. I'm basing my code on this documentation; any ideas if I'm somehow misusing the API?

1 Answer 1

2

You need to change request:

var query = new Parse.Query("Location");
query.withinMiles("center", parseLocation, 15);
query.limit(10);
return query.find().then(function (locations) { ... });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.