我试图在解析中应用地理点,但我无法进行查询。代码如下。
ParseObject placeObject = new ParseObject("placeObject");
ParseGeoPoint userLocation = (ParseGeoPoint) placeObject.get("location");
ParseQuery query = new ParseQuery("PlaceObject");
query.whereNear("location", userLocation);
query.setLimit(10);
query.findInBackground(new FindCallback() {
public void done(List<ParseObject> Locaciones, ParseException e) {
if (e == null) {
Log.d("ERROR",Locaciones.toString());
// object will be your game score
} else {
Log.d("ERROR",e.toString());
// something went wrong
}
}
});