[Rails] newbie needs advise: from prawnto to htmldoc (googlemaps)
hi, i used to utilize prawnto, but due limitations i went on to
htmldoc. basic problem (i hope):
this was working code in prawnto:
h = Hash.new
h[:pic_google_map]="http://maps.google.com/maps/api/staticmap?
center=#{@address.lat},#{@address.lng}
&zoom=12&size=400x400&sensor=false"
pdf.image open(h[:pic_google_map]) , :position => :center
now im trying this similar in htmldoc, but it always gives me an
argumet-count error:
h = Hash.new
h[:pic_google_map]="http://maps.google.com/maps/api/staticmap?
center=#{@address.lat},#{@address.lng}
&zoom=12&size=400x400&sensor=false"
<%= pdf_image_tag2(h) %>
def pdf_image_tag2(image, options = {})
options[:src] =
open(image[:pic_google_map])#File.expand_path(RAILS_ROOT) + '/public/
images/' + image
tag(:img, options)
end
pls help
thx
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home