Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Create KML files for tasty overlays on google earth and google maps
tree: 4d133513ae

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.travis.yml
Gemfile
Gemfile.lock
LICENSE
README.textile
Rakefile
kamel.gemspec

README.textile

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
Something went wrong with that request. Please try again.