static-gmaps gem

Gem details

Provides an interface to the Google Static Maps API.

Websitehttp://static-gmaps.rubyforge.org/ Author John Wulff Tags Maps, Google

Documentation

Install the Gem:
gem install static-gmaps

# Get from http://code.google.com/apis/maps/signup.html

GOOGLE_MAPS_API_KEY = ''



  map = StaticGmaps::Map.new :center   => [ 40.714728, -73.998672 ],
                             :zoom     => 5,
                             :size     => [ 500, 400 ],
                             :map_type => :roadmap,
                             :key      => GOOGLE_MAPS_API_KEY
  map.markers << StaticGmaps::Marker.new(:latitude => 40,
                                         :longitude => -73,
                                         :color => :blue,
                                         :alpha_character => :b)
  map.url => 'http://maps.google.com/staticmap?center=40.714728,-73.998672&key=GOOGLE_MAPS_API_KEY&map_type=roadmap&markers=40,-73,blueb&size=500x400&zoom=5'

Edit Gem | (0 older versions) | Last edited by: scott, 2 months ago