Kamel

gem install kamel

Create KML files for tasty overlays on google earth and google maps. Provides a cleaner interface than ruby_kml (which it uses internally).

Tested on ruby 1.8.7 and 1.9.3.

Usage

require 'rubygems'
require 'kamel'

overlay = Kamel::Overlay.new
overlay.name = 'Melbourne Train Stations'
[
  ["Flinders St",    -37.818078, 144.966811],
  ["Southern Cross", -37.818358, 144.952417],
].each do |name, lat, lng|
  overlay.placemark!(
    :name        => name,
    :description => "This is a train station",
    :location    => {:lng => lng, :lat => lat},
    :icon        => "http://www.uksa.org/images/about/train-icon.gif"
  )
end
puts overlay.to_kml