Can vertical searches be done within a bounding box?

I know the Static Filters can be done for a specific location or in a radius, and I know that the search configuration can be locked to a specific bounding box.

I’m looking for a way where I can query builtin.location.lat and builtin.location.lng within a box, rather than in a circle around a point.

At present my workaround is a custom field with a number type that mirror the latitude and longitude coordinates, but it feels like there should be a cleaner way.

1 Like

Hey Eric,

Unfortunately the only way queries using builtin.location work is by point and radius. May I ask what is your intended purpose for wanting to query a square around a point rather than a circle?

The maps that are displayed to our customers show a square view, rather than a circle view. When we show a square view but the locations are rendered within a circle, it causes us to give the false impression that we’re not in some locations that are visible on the screen.

If builtin.location is unable to be queried directly as numbers, would it be possible to index any of the other coordinates (such as cityCoordinate, geocodedCoordinate or displayCoordinate)? We get failure messages when trying to have those, or their attritubes, indexed as a Number.

I don’t believe that is possible unfortunately. My recommendation here would be to search on a radius bigger than the size of the map you are displaying. You can update the radius returned using the minLocationRadius property in the JSON config. See example here.

What would be the process to have this added as a feature request? It is functionality common on most geospatial search systems:

The proposal of a bigger search radius creates the inverse problem, where locations would be found on N/S/E/W regions that are outside the viewport. Granted you could do client-side work to filter those out, but that creates a message for pagination and result count.

You can submit your feature request to the Hitchhikers Ideas board! Other users can upvote and comment on your ideas, which will help our Product team prioritize requests. You’ll get notifications on any updates.