【Android】Parse 开发笔记(3)—— 实现查找附近的功能(LBS)
一、系列 1、【Parse】开发笔记(1)—— 准备 2、【Parse】开发笔记(2)—— 从Mysql导入数据到Parse Data 二、简介 要实现查找附近的人的功能,一般步骤:通过设备定位获得地理位置信息,上传到服务端保存数据,通过比较排序获得数据。 三、Mysql版本 典型的SQL语句如: ORDERBYABS(locationLatitude-?+locationLongitude-?) (PS~~~,如果数据量大、还关联多个表,这语句要歇菜鸟~~~) 四、Parse版本 public staticList<ParseObject>queryAroundUsers( finalContextctx,POUseruser, intminute, intstartIndex, intpageSize) throwsParseException{ ParseQueryquery= newParseQuery("nmbb_user"); ParseGeoPointpoint= newParseGeoPoint(); point.setLatitude(user.loc...


