algoliasearch/src/main/java/com/algolia/search/saas/Query.java
public @NonNull
    Query setInsideBoundingBox(@Nullable GeoRect... boxes) {
        if (boxes == null) {
            set(KEY_INSIDE_BOUNDING_BOX, null);
        } else {
            StringBuilder sb = new StringBuilder();
            for (GeoRect box : boxes) {
                if (sb.length() != 0) {
                    sb.append(',');
                }
                sb.append(box.p1.lat);
                sb.append(',');
                sb.append(box.p1.lng);
                sb.append(',');
                sb.append(box.p2.lat);
                sb.append(',');
                sb.append(box.p2.lng);
            }
            set(KEY_INSIDE_BOUNDING_BOX, sb.toString());
        }
        return this;
    }
public @NonNull
    Query setInsideBoundingBox(@Nullable GeoRect... boxes) {
        if (boxes == null) {
            set(KEY_INSIDE_BOUNDING_BOX, null);
        } else {
            StringBuilder sb = new StringBuilder();
            for (GeoRect box : boxes) {
                if (sb.length() != 0) {
                    sb.append(',');
                }
                sb.append(box.p1.lat);
                sb.append(',');
                sb.append(box.p1.lng);
                sb.append(',');
                sb.append(box.p2.lat);
                sb.append(',');
                sb.append(box.p2.lng);
            }
            set(KEY_INSIDE_BOUNDING_BOX, sb.toString());
        }
        return this;
    }
public @ NonNull Query setInsideBoundingBox ( @ Nullable GeoRect ... boxes ) { if ( boxes == null ) { set ( KEY_INSIDE_BOUNDING_BOX , null ) ; } else { StringBuilder sb = new StringBuilder ( ) ; for ( GeoRect box : boxes ) { if ( sb . length ( ) != 0 ) { sb . append ( ' ' ) ; } sb . append ( box . p1 . lat ) ; sb . append ( ' ' ) ; sb . append ( box . p1 . lng ) ; sb . append ( ' ' ) ; sb . append ( box . p2 . lat ) ; sb . append ( ' ' ) ; sb . append ( box . p2 . lng ) ; } set ( KEY_INSIDE_BOUNDING_BOX , sb . toString ( ) ) ; } return this ; }
Search for entries inside one area or the union of several areas
defined by the two extreme points of a rectangle.
Search for entries inside one area or the union of several areas defined by the two extreme points of a rectangle .