Big data sets and challenges using the Leaflet client

Qgis2web can minify the GeoJSON. That will gain you a bit. It can also reduce the geometry precision - the number of decimal places (as qgis2leaf can).

Edit: qgis2web also supports scale-dependent visibility. Could this help?


This is the compromise between client-side and server-side data handling.

You can try using TopoJSON to make your file smaller, but it's a little tricky to run, and works better on polygons, including simplification.

I think you're best off using a server platform. CartoDB is free for small use like this, and it's got other advantages like fancy visualisation and styling and an awesome SQL API.

I built a visualisation using CartoDB and Leaflet that handles a large number of points here. I had wanted to use JSON and Leaflet clustering but the dataset was too big. My rule of thumb is more than ~1.5 MB and you don't want to be downloading it client-side any more!

If you're intent on doing it yourself, try TileJSON. I haven't had a go at getting it running, and you still need server-side processing.