Closed tmcw closed 10 years ago
the the idea of a heatmap pluging, this would be a sick demo ;)
@mourner do you have any favorites here?
Cool, will see if he merges my pull req. If that happens, I'll update his site to newest leaflet and contribute some better docs, and then we should add it to the repo.
@tmcw yeah the Patrick's one is the best, but I wouldn't say it's well supported. There's also a supposedly high-performance WebGL one.
Actually I had some plans to write my own fast heatmap plugin a while ago, thought didn't get to it yet. The idea would be to cluster the points firts and then draw the heatmap, minimizing Canvas operations. I have a proof of concept for this.
Actually I had some plans to write my own fast heatmap plugin a while ago, thought didn't get to it yet. The idea would be to cluster the points firts and then draw the heatmap, minimizing Canvas operations. I have a proof of concept for this.
:thumbsup: I've been slightly dissatisfied with the offering. Right now, each plugin has fairly heavy tradeoffs in either performance, browser support, or ease of use.
Hm, okay - unless someone has bandwidth to make this, I'm leaning towards fixing the warts around heatmap.js so that we can get the basics out there.
Right now, each plugin has fairly heavy tradeoffs in either performance, browser support, or ease of use.
@rsudekum if you could provide me with a test case for performance (e.g. a sample GeoJSON with tons of points that you would expect to work smoothly) that's not good enough in heatmap.js, I'd love to try to quickly make a proof of concept demo that's fast and smooth.
OK, after delving deeper into heatmap.js, I decided that its code is crap, so I cleaned up my past experiment on heatmaps and published on GH: https://github.com/mourner/simpleheat
It's super-simple and tiny (80 sloc vs 502 of heatmap.js) and has pretty much identical results while being about 6x faster.
I'll create a simple Leaflet layer from it (with proper zoom animations etc.) and publish as Leaflet.heatmap on Leaflet org.
Note that this is barebones heatmap code (without clustering for performance etc.). But it's much easier to experiment with a tiny and clean implementation now.
OK, here's the first version of my Leaflet heatmap plugin https://github.com/Leaflet/Leaflet.heat demo with 10k points: http://leaflet.github.io/Leaflet.heat/demo/
Feedback welcome! After it looks good, we should package it as a mapbox.js plugin and then I'll blog about it.
@mourner I have a real point data set that gives the walkability in San Francisico. Would you be interested in using that for you blog post?
@DennisOSRM I'd love to (if it looks good), please share.
Published as a mapbox.js plugin, deployed to CDN, added to plugins list and added an example: https://www.mapbox.com/mapbox.js/example/v1.0.0/leaflet-heat/ — so this is done. Post to follow.
@mourner will send you the links later today
love the demo of the heat map @mourner
Is there a well-supported heatmap plugin? Might be good.