示例#1
0
 @Test(timeout = 10000)
 public void getListCircleGeowithinEqualToLimit() throws CloudException {
   initialize();
   CloudGeoPoint loc = new CloudGeoPoint(17.3, 78.3);
   CloudQuery query = new CloudQuery("Custom5");
   query.geoWithin("location", loc, 1000.0);
   query.setLimit(4);
   query.find(
       new CloudObjectArrayCallback() {
         @Override
         public void done(CloudObject[] x, CloudException t) throws CloudException {
           if (t != null) {
             Assert.fail(t.getMessage());
           }
         }
       });
 }
示例#2
0
 @Test(timeout = 50000)
 public void getListPolygonGeowithinEqualToLimit() throws CloudException {
   initialize();
   CloudGeoPoint loc1 = new CloudGeoPoint(18.4, 78.9);
   CloudGeoPoint loc2 = new CloudGeoPoint(17.4, 78.4);
   CloudGeoPoint loc3 = new CloudGeoPoint(17.7, 80.4);
   CloudQuery query = new CloudQuery("Custom5");
   CloudGeoPoint[] loc = {loc1, loc2, loc3};
   query.geoWithin("location", loc);
   query.setLimit(4);
   query.find(
       new CloudObjectArrayCallback() {
         @Override
         public void done(CloudObject[] x, CloudException t) throws CloudException {
           if (t != null) {
             Assert.fail(t.getMessage());
           }
         }
       });
 }