Hi,there
This question might sound a bit out-dated but I am still struggling with
it.
When I try to display the google map in my application, I rendered
@map.to_html like everyone else does, but didnt get any result. The
error shows as follows
ActionView::TemplateError (You have a nil object when you didn’t expect
it!
The error occured while evaluating nil.zoom=) on line #1 of
app/views/admin/content/_place_map.rhtml:
1: <% @map.zoom = 4 %>
2: <%= @map.to_html %>
By using the google map API,I followed the instruction in readme
strictly. register for a new key and include the cartographer module in
RAILS_ROOT/config/environment.rb by require ‘cartographer’
It looks like I was able to get @map.to_html in my controller but not
able to render in the view.
Anyone encountered this problem before?
Thanks for any help!