I am building a mobile app which lets users search for POIs around them on a map. I am curious to know what would be the best way to "group/paginate" these results in order to avoid downloading hundreds of search results at once from the server?
I looked at Google Maps as an example and the way they seem to do it is they only return a fixed number of results, spread across the map and once you start zooming in somewhere, you start to see more results in that area. In other words, they show one search result per a certain size of area. This seems like a good approach, but I don't know how would I implement such behaviour on the server-side.
Any input is highly appreciated!