I am trying to get gmaps running with my mongoid application. I was able to display the map, but it isn't rendered correctly. See this image http://imagebin.org/165962 .
This is my model:
class Upload
include Mongoid::Document
include Mongoid::Document::Taggable
include Gmaps4rails::ActsAsGmappable
belongs_to :user
acts_as_gmappable
field :name, :type => String
field :description, :type => String
mount_uploader :file, FileUploader
field :latitude, :type => Float
field :longitude, :type => Float
field :gmaps, :type => Boolean
validates_presence_of :name
validates_presence_of :user
# snip
# ...
# see https://github.com/apneadiving/Google-Maps-for-Rails
def gmaps4rails_address
"Berlin, Germany"
end
end
The controller fills a variable @json:
@json = Upload.all.to_gmaps4rails
And I use it like this in the view:
<%= gmaps4rails(@json) %>
I don't know how to find the cause of this rendering problem. Can I supply more information?
I am trying to get gmaps running with my mongoid application. I was able to display the map, but it isn't rendered correctly. See this image http://imagebin.org/165962 .
This is my model:
The controller fills a variable
@json
:And I use it like this in the view:
I don't know how to find the cause of this rendering problem. Can I supply more information?