I donβt believe there is a built-in way to do this, but one way could be to create a square grid and assign each location to an area - for example, an area
{x: 2, y: 4}

Then you can return all the locations in the region and neighboring regions, returning everything in a certain range that could be configured in the data call. For example, if you want to return everything within 1 area of {x: 2, y: 4} , you should return:
{x: 1, y: 3} {x: 1, y: 4} {x: 1, y: 5} {x: 2, y: 3} {x: 2, y: 4}

This will return the square surrounding your region and all the places on that square. If you need it to be round, you could crop your choice on the front side. This is not an ideal solution, but it may be a way to do what I think you are trying to accomplish, which is less data.
source share