我有这样的问题。我正在使用 google_maps_for_rails gem,它无法正确找到位置。我运行文档中的所有说明。
这是我的application.erb:
<%= yield :scripts%>
我的模型:
attr_accessible :address, :latitude, :longtitude
acts_as_gmappable
def gmaps4rails_address
self.address
end
但是当我创建位置时,我得到的对象是零经度。这是日志:
INSERT INTO "locations" ("address", "created_at", "latitude", "longtitude", "name",
"updated_at") VALUES (?, ?, ?, ?, ?, ?) [["address", "Lviv"], ["created_at", Thu, 07
Feb 2013 10:56:45 UTC +00:00], ["latitude", 49.839683], ["longtitude", nil], ["name",
nil], ["updated_at", Thu, 07 Feb 2013 10:56:45 UTC +00:00]]
有人能帮我吗 ?