center of a polygon created with mapbox
<p>I would like to know how to calculate the centre of a polygon created with this code from Mapbox: <a href="https://www.mapbox.com/mapbox.js/example/v1.0.0/show-polygon-area/" rel="nofollow">https://www.mapbox.com/mapbox.js/example/v1.0.0/show-polygon-area/</a>
I would like to place a marker on the centre of the polygon after it's been created.
Thanks in advance.</p>