This is code I have written def index @cities = City.all @json = City.all.to_gmaps4rails
respond_to do |format| format.html # index.html.erb format.json { render :json=> @cities } end end def create @city = City.new(params[:city]) respond_to do |format| if @city.save format.html { redirect_to @city, :notice => 'City was successfully created.' } format.json { render :json=> @city, :status => :created, :location => @city } else format.html { render :action => "new" } format.json { render :json=> @city.errors, :status => :unprocessable_entity } end end end Index view <%= gmaps4rails(@json) %> My Input is *Name:* Spencer *State:* Musheerabad *Latitude:* 17.4157 *Longitude:* 78.4993 I got above result to my inputs but it did not locate exactly. When I gave same Inputs using another app which http://electric-sunrise-8410.heroku.com/locations/new In this link he used direct google api. not gem. *Latitude:* 17.412577 *Longitude: *78.49859200000003 The above are the exact location what I want. This is the issue I am facing with this gem. As the above link was more specific with address. On Mon, Feb 11, 2013 at 8:46 PM, Colin Law <clan...@googlemail.com> wrote: > On 11 February 2013 10:25, honey ruby <emailtohoneyr...@gmail.com> wrote: > > Hey all, > > > > > > I am using google maps for rails gem. When I use this It is going with > > location not specific. Let say I am looking for a store location in > Houston > > in Tx . The issue is, it is not locating exact store rather it is just > > locating only Huston. Can any one help me what to do. > > Can you give more detail? Show us exactly which call you are making > and what the parameters are and what result you get. > > Colin > > > > > > > > > > > > > Thanks in advance, > > Honey > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to rubyonrails-talk+unsubscr...@googlegroups.com. > > To post to this group, send email to rubyonrails-talk@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/rubyonrails-talk/-/UVvK-DCLirEJ. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.