Cloud.Places.search Parameters

You must Login before you can answer or comment on any questions.

Where can I find out exactly what properties the dictionary object passed as a parameter to Cloud.Places.search() takes?

The things that I'm trying to accomplish are:

1) Set max distance filter.

2) Set a max number of results.

3) Sort the results by distance (I can do this one myself if I know how to do the two things above).

Thanks.

1 Answer

I answered my own question. The parameters a re listed here: http://cloud.appcelerator.com/docs/api/v1/places/search

With the added distance property my search looks like this:

Cloud.Places.search({
 
            latitude: lat,
            longitude: lon,
            distance: 5 // in kilometers
 
        }, function (e) {
 
            if (e.success) {
 
                renderSearchResults(e);
 
            } else {
 
                alert('Error:\\n' +
                ((e.error && e.message) || JSON.stringify(e)));
 
            };
 
        });

Your Answer

Think you can help? Login to answer this question!