Google-Maps-for-Rails

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.

Thanks in advance, Honey

I used google_maps_for_rails gem.

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

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.