foursquare 或 gowalla 等应用程序如何实现签到功能?
如果我必须从头开始构建自己的签到功能,我会怎么做?我在想,一旦使用核心位置确定了位置,我就可以将该位置坐标和时间戳添加到某些服务器中的数据库中。现在,一旦我的一位朋友在该位置附近签到,就可以对数据库进行查询,以找出该位置周围和该时间戳周围的所有签到。他们就是这样实现这个功能的吗?
If I had to build my own check-in feature from scratch, how would I go about it? I was thinking that once a location is determined using corelocations, I can add that location co-ordinate and timestamp to a database in some server. Now once one of my friends check-in close to that location, there can be a query to the database to figure out all check-ins around that location and around that timestamp. Is that how they implement this feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些服务使用当前位置(您可以通过 CoreLocation 或其他方式获取)来确定在用户附近显示哪些场地。请注意,他们通常有一个营业场所数据库,用户选择实际所在的营业场所并执行签到。
因此,为了弄清楚“你和谁一起出去玩”,他们只需查看在该时间戳附近的特定位置有谁签到。
请注意,整个事情可以在没有位置服务和地理坐标的情况下实现 - 只需从列表中选择!现在,借助位置服务,您可以帮助用户快速搜索地点。
Those services use the current location (that you could get via CoreLocation or otherwise) in order to determine which venues to show near the user. Note that they usually have a database of business venues and the user selects the one they are actually and perform the checkin.
So, in order to figure out "who you are hanging out with", they only have to see who has checked in in that specific location, around that timestamp.
Note that the whole thing could have been implemented without location services and geographical coordinates - just choose from a list! Now, with location services, you can help the user search for the place quickly.