I am having a problem figuring out how to create a heatmap overlay having:
- set of points and their correspondig repetition counter
- maximum repetition counter for a single point
- minimum repetition counter for a single point
If you have any code examples I would appreciate.
Edit
I need to end up with an UIImage that shows a map in lets say rainbow colors (red - hottest -> blue coldest)
The idea that I have is to:
-create grayscale image
-draw small gray scale gradients at each point with some alpha (overlaying the same point will increase its visual density)
-create a copy of grayscale image and call it heatmapImage
-for every pixel in the heatmapImage check the pixel grayscale and replacy it with appropriate pixel color from a heat gradient array.
But don't know how to put it into a code.