pa7/heatmap.js — pull request #109 by iernie (2014-07-21 11:55:54+00:00)
Title: Don't create new heatmap if one already exists

This was causing duplicate canvases if layers were removed and added.

Scenario I was having: Hide layer at some zoom level and re-add it when zooming out again. Each time I zoomed in and out, I had a new canvas in the DOM and multiple heatmaps on top of each other.

This may be fixed in a better way, but this fixed it for me.