I want to implement heat maps over Google maps with my own data beyond my Rails application. To do this I need to generate overlay images for each map coordinate (tile) based on my data.
I found how to generate that using ImageMagick but I do not want to depend on this, because I plan to distribute my application in several places, so I would like to do this using only the Ruby language.
Note that I need only to plot points in different colors over an small transparent square.
I think chunky_png or oily_png will be your best bet on this. It has no external dependencies on ImageMagick, and generates images in a web-usable format.
This is a big problem by itself, but is a resolved problem, see Geoserver or Mapserver.
来源:https://stackoverflow.com/questions/10747029/how-can-i-generate-an-image-in-ruby-without-external-dependencies