OnCoord logo

Autocomplete within radius of point

This demo shows how to use a boundary.circle.lat and boundary.circle.lon spatially limit the results when performing an autocomplete search.

Results will be limited to features that fall within a specified radius distance.

boundary.circle.lat and boundary.circle.lon define the center point of the search area, while radius sets the radius (in meters).

Unlike a focus point (which boosts nearby matches but can still return distant results), a boundary circle will exclude all results that fall outside the specified radius.

For example, searching for “McDonalds” with a boundary circle centered in Rio de Janeiro and a radius of 500 meters will only return McDonalds locations within that 500 m area. Locations outside the circle will not be included in the results.