when I query my collection based on a distance (i.e. 10km) the API returns the items in reverse order (i.e. farthest first). This is contrary to what the documentation states. How can I get them in the proper order. Here is my code:
var options = {
type:"businesses",
client:dataClient,
qs:{ ql:"location within 10000 of " + geo.lat + ", " + geo.lon }
},
collection = new Apigee.Collection( options );
//Call request to initiate the API call
collection.fetch( function ( error, response ) {
if (error) {
//error
console.log( error );
} else {
//success
populateList( response );
}
});
This is a known bug that we are woking on. Currently, there is no ETA of when a fix will be made.