Kamel
gem install schleyfox-ruby_kml --source http://gems.github.com
gem install kamel --source http://gemcutter.org/
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.6-339, 1.8.7-160 and 1.9.1-rc2
Usage
require 'rubygems'
require 'kamel'
= Kamel::Overlay.new
.name = 'Melbourne Train Stations'
[
["Flinders St", -37.818078, 144.966811],
["Southern Cross", -37.818358, 144.952417],
].each do |name, lat, lng|
.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 .to_kml
Maturity
As far as I know this code is not being used in production, certainly not by me. It depends on a fork of kmlr which is no longer maintained and is not even published to rubygems. So, use at your own risk.