How to use Leaflet to efficiently show parts of a massive dataset?

المشرف العام

Administrator
طاقم الإدارة
I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is.

  1. There is some dataset of thousands of items.
  2. We want to show a map to the user, with the visible subset of them shown as interactive, clickable elements.
What methods are there for doing this?

I can think of these, but they're not very satisfactory, so I'm wondering what else there is:

  1. Store all the data in a GeoJSON file, transfer it to the browser, and let Leaflet display it. Problem: doesn't really work with large datasets. TopoJSON raises the limit a bit. It also causes a big delay at page load.
  2. Use Mapbox, store all the data in an interactive layer on Mapbox, and use Mapbox.js to display it. Works great, but costs money, and you can't host it yourself.
  3. Use GeoServer to access a PostGIS database, use the WFS-geojson leaflet plugin to access the data from there. It probably works, but the WFS-geojson Leaflet plugin doesn't seem to be maintained anymore.
  4. Use CartoDB, store all the data in a CartoDB table, and use CartoDB.js to display it. Works great, but can get very expensive. It's possible to host it yourself, but installing CartoDB is non-trivial.
All of this makes me think there must be some much better, free way that I'm missing. What is it?



أكثر...
 
أعلى