Im trying to use geocoder for displaying a location based on an address.
My question is, what do I put in the view to show an interactive map once I got the Lat and Long from the address the user inserted in the database?
my address model
belongs_to <another model>
attr_accessible <all addresses attributes including latitude and longitude>
geocoded_by :address
after_validation :geocode, :if => :address_changed?
The fields Latitude and Longitude are automatically calculated after I insert the address.
I've followed Ryan's Rail Cast tutorial but at the end, instead of displaying a static image I want to display a map, google maps interactive style. How can I achieve this?
If've taken a look at Google-Maps-for-Rails but couldn't understand how very well like how to get a single map on location in the show view.