开发者

Most accurate way to find local businesses?

I have a client who wants his site's users to be able to "check-in" to places, much like Foursquare. I have a basic location-fetching script done, and it stores the latitude and longitude of the user's current location in a database. What would be the most accurate query to get other loc开发者_StackOverflowations nearby? I'm not entirely sure how I'm supposed to do that correctly (never dealt with location-based sites before).

The basic table structure is like this: id, business_name, lat, long.

Thanks!


You should access an API to a service that provides this kind of data. For example, Yahoo! Local or Google Places.

Basically, you'll be submitting coordinates to their web service, parsing the results, and returning the results in your preferred format to the user.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜