Skip to main content
  • Type: list<number>
  • Default: null
  • Scope: search
The insideBoundingBox parameter defines rectangles in which to search. Only records with coordinates (_geoloc attribute) within these rectangles are included in the search results. Each rectangle is defined by the latitude and longitude of two diagonally opposite corners (p1Lat, p1Lng, p2Lat, p2Lng).

Usage

  • Use a list of 4 numbers for one rectangle. For example: [47.3165, 4.9665, 47.3424, 5.0201]
  • Use multiple rectangles by:
    • Providing a longer flat list (must be multiples of 4: 8, 12, 16, … values). For example: 47.3165,4.9665,47.3424,5.0201,40.9234,2.1185,38.6430,1.9916.
    • Using a list of lists, each list with 4 values. For example: [[47.3165, 4.9665, 47.3424, 5.0201], [40.9234, 2.1185, 38.6430, 1.9916]].
    • Records that are in either rectangle will be returned
  • aroundLatLng and aroundLatLngViaIP will be ignored if used along with this parameter.
  • Cannot be combined with insidePolygon. If both are present, only insideBoundingBox is applied.
  • Be cautious when specifying rectangles that cross the 180th meridian.

Examples

Current API clients

Search inside one rectangle

index.Search(new Query("query")
{
    InsideBoundingBox = new List>
    {
        new List
        {
            46.650828100116044f,
            7.123046875f,
            45.17210966999772f,
            1.009765625f
        }
    }
});

Search inside multiple rectangles

index.Search(new Query("query")
{
    InsideBoundingBox = new List>
    {
        new List
        {
            46.650828100116044f,
            7.123046875f,
            45.17210966999772f,
            1.009765625f
        },
        new List
        {
            49.62625916704081f,
            4.6181640625f,
            47.715070300900194f,
            0.482421875f
        }
    }
});

Search inside one rectangle

index.Search(new Query("query")
{
    InsideBoundingBox = new List>
    {
        new List
        {
            46.650828100116044f,
            7.123046875f,
            45.17210966999772f,
            1.009765625f
        }
    }
});

Search inside multiple rectangles

index.Search(new Query("query")
{
    InsideBoundingBox = new List>
    {
        new List
        {
            46.650828100116044f,
            7.123046875f,
            45.17210966999772f,
            1.009765625f
        },
        new List
        {
            49.62625916704081f,
            4.6181640625f,
            47.715070300900194f,
            0.482421875f
        }
    }
});
I