January 25, 2006

Posted by John

Tagged maps and plugins

Older: Several approaches to PDF creation with Rails

Newer: Running Rails on the LiteSpeed webserver

An easy way to add Google Maps using Cartographer

The [Cartographer](http://rubyforge.org/projects/cartographer/) plugin for Ruby makes adding Google Maps to your Rails app a breeze. Want to see how easy it is to add a map? Here’s some the sample code that they provide:

<%= gmap(:mapname=>"my_map", :width=>"50", :height=>"120") %> <%= gmap(:width=>"500", :height=>"500", :type=>:satellite, :point=>[-122.14944, 37.441944]) %> <%= gmap(:mapname=>"foo", :white_div=>{:background_color=>’black’, :height=>’40’}) %>

There’s more [in the documentation](http://dotsx.usc.edu/cartographer/).


Thoughts? Do Tell...

textile enabled, preview above, please be nice
use <pre><code class="ruby"></code></pre> for code blocks


Authored by John Nunemaker (Noo-neh-maker), a programmer who has fallen deeply in love with Ruby. Learn More.


Release your software more often with fewer problems.
Flip your features.