I have used polygonal hotspots for my real estate tours. Since krpanojs does not support polygonal hotspots I wanted to automatically create point hotspots when a tour is viewed on iPad/iPhone.
From the formula described in this wikipedia article, I was able to write a function to calculate the centroid (center of mass) of a polygon and use that point for iPad/iPhone.
I wrote it in Python using language features that are not common among most programming languages, so I won't post it here because I would have to explain Python before explaining the function. The formula isn't very difficult though, so an average programmer should be able to easily complete it in under an hour.
The formula is meant for two-dimensional polygons, but seems to work well for krpano pan/tilt polygons. It works across the horizon and at the 0º meridian, but you need to make a few adjustments for the -180º/180º meridian. Also, polygons covering the poles (at tilt -90º/90º), may not be accurate, but it is not likely to have a polygon covering a pole so I did not handle this case.