map - How to sort result from foursquare place api according to distance? -


i fetching nearby restaurants foursquare api, getting json contains details of restaurants.it has "distance=xx".how can result least distance on first index of array ?

i found - "intent=match".but dont know how give in below url please me.thanks in advance

https://api.foursquare.com/v2/venues/search?radius=500&ll=10.00915,76.318738&limit=50&client_id=client_id&v=yyyymmdd&client_secret=client_secret&categoryid=4d4b7105d754a06374d81259

intent=match sensitive location , query pass in, , it's used find exact matches of you're looking (e.g., joe's coffeeshop right at precise lat/lon). may or may not you're looking for, use adding parameter api call, how added categoryid.

in general, using intent=checkin (which call defaults to) should sufficient depending on exact requirements. returns results sorted distance takes account how check in there first result not strictly closest.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -