Sha256: 7895b2af0c10ddc4cb3afa87ab211b9fa6e0d8e60a5fb7197f95ba43db88edd3
Contents?: true
Size: 1.96 KB
Versions: 4
Compression:
Stored size: 1.96 KB
Contents
== Google Maps for Rails (gmaps4rails) Gmaps4rails is developped to simply create a Google Map: - directly from your model, - from your own json It's based on Ruby on Rails 3 Engines and uses Google Maps API V3. See screencasts here: http://www.youtube.com/user/TheApneadiving == Requirements - gem 'gmaps4rails' (in your gemfile, then bundle) - <%= yield :head %> (in your header) - <%= yield :scripts %> (in your footer) - config.serve_static_assets = true (in your production.rb), or copy/paste gmaps4rails.css & gmaps4rails.js files in your app. == Basic configuration In your model, add: acts_as_gmappable def gmaps4rails_address self.address #describe how to retrieve the address from your model end Create a migration and add the following fields to your table (here users): add_column :users, :latitude, :float #you can change the name, see wiki add_column :users, :longitude, :float #you can change the name, see wiki add_column :users, :gmaps, :boolean #not mandatory, see wiki == How to? === QuickStart! In your controller: @json = User.all.to_gmaps4rails In your view: <%= gmaps4rails(@json) %> Done! == Options * Markers with Info window, Custom Picture * Automatic sidebar with list of markers * Circles, Polylines, Polygons * Geocode directly your address and retrieve coordinates. * Wrapper for 'Direction', giving instructions to go from point A to point B * Auto-adjust the map to your markers * Refresh your map on the fly with Javascript (and Ajax) * {More details in the Wiki}[https://github.com/apneadiving/Google-Maps-for-Rails/wiki] == Todo? * Marker clusterer customization * Integrate Markers with Label: http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.2/ * Other options from here: http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries Feel free ton contact us, you have your say. == Copyright MIT license. Authors: Benjamin Roth, David Ruyer Contributor: Alex Vorobiev
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gmaps4rails-0.7.9 | README.rdoc |
gmaps4rails-0.7.8 | README.rdoc |
gmaps4rails-0.7.7 | README.rdoc |
gmaps4rails-0.7.6 | README.rdoc |