'Creating a heatmap from polygons with leaflet

I am trying to create a heatmap with leaflet using Polygons as data. The data is stored as GeoJson. I have been trying to find a plugin for creating the Heatmap, but they only seem to work with points and not polygons. I am writing in JavaScript.

So far I have tried using the plugins from http://leafletjs.com/plugins.html#heatmaps.

Does anyone have any suggestions or direction?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source