public
Description: Zero-effort creation of Location-aware Rails application based on W3C Geolocaton API.
Homepage:
Clone URL: git://github.com/parolkar/geo_mere_laal.git
name age message
file MIT-LICENSE Mon Oct 19 11:54:56 -0700 2009 Created helpers [parolkar]
file README.markdown Wed Oct 28 10:10:18 -0700 2009 Thanks to Ruby5 (for Podcast) [parolkar]
file Rakefile Mon Oct 19 01:09:19 -0700 2009 Om Sree Ganeshaya Namah: [parolkar]
directory app/ Thu Oct 22 05:41:32 -0700 2009 falsified layout [parolkar]
directory config/ Wed Oct 21 00:29:41 -0700 2009 Added install script [parolkar]
directory docs/ Wed Oct 21 06:26:40 -0700 2009 added readme [parolkar]
file init.rb Tue Oct 20 06:16:04 -0700 2009 Added the reverse geolocation functionality [parolkar]
file install.rb Wed Oct 21 02:35:23 -0700 2009 Changes in install script [parolkar]
directory lib/ Wed Oct 21 06:00:44 -0700 2009 Added readme [parolkar]
directory tasks/ Mon Oct 19 01:09:19 -0700 2009 Om Sree Ganeshaya Namah: [parolkar]
directory test/ Mon Oct 19 01:09:19 -0700 2009 Om Sree Ganeshaya Namah: [parolkar]
file uninstall.rb Mon Oct 19 01:09:19 -0700 2009 Om Sree Ganeshaya Namah: [parolkar]
README.markdown

GeoMereLaal

(जियो मेरे लाल : ji-oo-me-re-laal : "Keep it up baby!")

GeoMereLaal plugin is all you need to create Location-Aware rails application based on W3C Geolocaton API.

Quick Audio Intro: Thanks to Ruby5 Podcast

What's Location-Awareness?

W3C proposed an API in which internet browsers can have capability to retrieve geo-location of the user via multiple sources (Wifi, LBS, IP, browser cookies) and share it with web apps so that apps can serve content based on user's location.

Who supports it?

Web Browser Geolocation API support
Mozilla Firefox supported in Firefox 3.5 and later versions.
Chrome Supports thru Google Gears Geolocation API
Opera Supported in nightly builds – download from this page
Safari Support is coming soon in the IPhone’s Safari browser.
Internet Explorer An experimental support available from IE8.

How do I use it?

Step 1 : Install

 script/plugin install git://github.com/parolkar/geo_mere_laal.git 

Step 2 : Create form (as you always did but with new helpers)

Note: You may want to generate Address model this way script/generate model Address street:string locality:string city:string state:string country:string zip:string lat:string lng:string

   
<% form_tag('#') do  -%>
   <%= label :address,"street","Street" -%>
   <%= street_field :address, "street" %>    
    
   <%= label :address,"locality","Locality" -%>
   <%= locality_field :address, "locality" %>  

   <%= label :address,"city","City" -%>
   <%= city_field :address, "city" %>  

   <%= label :address,"state","State" -%> 
   <%= state_field :address, "state" %>      

   <%= label :address,"country","Country Name" -%>
   <%= country_name_field :address, "country" %>

   <%= label :address,"zip","Postal Code" -%>
   <%= postal_code_field :address, "zip" %>
    
<% end %> 

Step 3: ...... there is no step 3 ;-)

The rendered form will auto fill the content with user's geolocation

Output


Copyright (c) 2009 Abhishek Parolkar, released under the MIT license