If it is bandwidth you might be successfull turning on gzip compression if you are using php. With websockets I have not tried any library supporting compression on the fly.
You might also be interested in testing to export the data in twkb format instead of geoJSON. Twkb is a very new format that I have constructed and implemented in PostGIS. It is now in PostGIS trunk.
It is far from optimized yet but still a lot smaller than geoJSON.
Take a look at the demo-sites
1) comparing twkb with geoJSON:
http://178.79.156.122/twkb_test
2) just showing twkb on a leaflet map. Data is sent by a websocket:
http://178.79.156.122/twkb_node
There is also links to blog posts about twkb.
Best Regards
I have a leaflet map with thousands of GeoJSON features and seek to improve
--
---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Long story short, I've got a tiled layer that uses GeoJSON to draw lots of Polylines. Doing it with Leaflet's GeoJSON was very slow. Norbert Renner did some work removing parts of Leaflet's GeoJSON system until he got something that was faster. I ended up using a plugin for Leaflet that uses D3 to render GeoJSON.
When I try that plugin using var myLayer = new L.TileLayer.d3_geoJSON(null), I get a TypeError t is null in leaflet. Can I not just add the layer, then later add data?
// Add a fake GeoJSON line to coerce Leaflet into creating the <svg> tag that d3_geoJson needsnew L.geoJson({"type": "LineString","coordinates":[[0,0],[0,0]]}).addTo(map);