Ruby on Rails
Cartographer Plugin (Version #9)

Allows you to plop Google Maps down into your Rails app without knowing a lick of ECMAScript Javascript.

USAGE

  • Place in vendor/plugins/
  • Get a Google Maps API key and tell it to Cartographer
  • add <%= gmaps_header %> to your layout
  • In controller, such as:
@map = Map.new(:name => ‘mymap’, :width => 300, :center => Point.new(-110, 33))
  • In view, such as: <%= @map.to_html %>
  • You can add markers as well:
@map.markers << Marker.new(:position => Point.new(lng, lat), :info_window => “You clicked my marker”)

svn: svn://rubyforge.org//var/svn/cartographer/trunk/vendor/plugins/cartographer/

See also Plugins and the rubyforge page

FYI, I think this plugin was incorrectly refactored and may take a lot of finessing to get it running correctly (the docs are outdated as well).

Related
If you want to integrate (Google) maps in your Rails application be sure to also check YM4R.

Allows you to plop Google Maps down into your Rails app without knowing a lick of ECMAScript Javascript.

USAGE

  • Place in vendor/plugins/
  • Get a Google Maps API key and tell it to Cartographer
  • add <%= gmaps_header %> to your layout
  • In controller, such as:
@map = Map.new(:name => ‘mymap’, :width => 300, :center => Point.new(-110, 33))
  • In view, such as: <%= @map.to_html %>
  • You can add markers as well:
@map.markers << Marker.new(:position => Point.new(lng, lat), :info_window => “You clicked my marker”)

svn: svn://rubyforge.org//var/svn/cartographer/trunk/vendor/plugins/cartographer/

See also Plugins and the rubyforge page

FYI, I think this plugin was incorrectly refactored and may take a lot of finessing to get it running correctly (the docs are outdated as well).

Related
If you want to integrate (Google) maps in your Rails application be sure to also check YM4R.