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 boundary.circle.radius sets the radius (in km).

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 -22.919, -43.225 (Rio de Janeiro) and a radius of 750 meters (0.75 km) will only return McDonalds locations within that 750 m area. Locations outside the circle will not be included in the results.