Best practices for showing large data results on a map?

Hi, we are using Algolia to display real estate properties for sale on a Google map. We plan to populate our search engine with 75K+ records.

Based on our map’s min zoom level and bounding box area, this means a user could possibly render about 30K properties at once.

(Side note: To keep the browser from crashing trying to render 30K pins, we use a clustering library which renders nearby pins into clusters with a counter on it that counts how many properties are represented in the cluster.)

The main issue we have right now is, the max hits per page in Algolia is 1,000. This means that the map only renders max 1,000 pins per page. We’d like to control how many listings are rendered based on the map’s bounds, and not based on a pagination limit. How can we do this?

I’m also wondering if this is the best approach for our needs. Since we have such high volume of data needed with each query is there a better approach worth considering?

Hi @bidzen you might find this documentation helpful depending on how you have implemented your geosearch. If you are still having issues getting that many results, then Algolia may not be the solution you need as going beyond 1000 results could slow your search significantly depending on your configuration.

Hey @bidzen as @cindy.cullen suggested, you could increase the size of your result but your users will suffer due to low performance. Usually, if you want to render POI (places of interest) in a large map, you should look at something like MapTiller, a map server and built specifically to handle such use cases. There are some open source alternatives to MapTiller which you could use as well.

Hello,

We used to do a map with Algolia on my company and we display 30K+ records on it. To achieve this, we do use the Facets: Each POI is associated with multiple geographics fields (Country, Region, City) than we compute based on GeoJSON shapes, and a few fields “geoGrid6”, “geoGrid7”, “geoGrid8” corresponding to zoom level which allow to clusterize the POI that way:

We do a phase of front-side clustering of theses already clustered data, because back-side clusters are made by KMs distances when font-side clusters are made of pixels distance relative to the client screen resolution.

And depending on the level of zoom, we change which field is used to display the POI. So the POI are actually almost never really loaded (the hitsPerPage is to 0) until we reach a very big zoom level. This ensure a low bandwich usage and good performances.

Here how it look: Map - YouTube

Unfortunately, we do have others contraints related to our Map framework which causes delay and our map is a bit slow to render the POI’s, but it is not at all related to Algolia performances.

1 Like