Ejemplo n.º 1
0
 @Test(timeout = 50000)
 public void getListCircleGeowithin() throws CloudException {
   initialize();
   CloudGeoPoint loc = new CloudGeoPoint(17.3, 78.3);
   CloudQuery query = new CloudQuery("Custom5");
   query.geoWithin("location", loc, 1000.0);
   query.find(
       new CloudObjectArrayCallback() {
         @Override
         public void done(CloudObject[] x, CloudException t) throws CloudException {
           if (t != null) {
             Assert.fail(t.getMessage());
           }
         }
       });
 }
Ejemplo n.º 2
0
 @Test(timeout = 50000)
 public void getDataNearFunction() throws CloudException {
   initialize();
   CloudGeoPoint loc = new CloudGeoPoint(17.7, 80.3);
   CloudQuery query = new CloudQuery("Custom5");
   query.near("location", loc, 100000.0, 0.0);
   query.find(
       new CloudObjectArrayCallback() {
         @Override
         public void done(CloudObject[] x, CloudException t) throws CloudException {
           if (t != null) {
             Assert.fail(t.getMessage());
           }
         }
       });
 }
Ejemplo n.º 3
0
 @Test(timeout = 50000)
 public void getListPolygonGeowithin() 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.find(
       new CloudObjectArrayCallback() {
         @Override
         public void done(CloudObject[] x, CloudException t) throws CloudException {
           if (t != null) {
             Assert.fail(t.getMessage());
           }
         }
       });
 }