gmaps4rails 将图像添加到信息窗口
我很喜欢使用 gmaps_4_rails gem,并且对其配置的简便性印象深刻。我遇到的唯一问题是如何将图像添加到信息窗口,并且我花了很多时间试图让它工作。我无法举个例子:
def gmaps4rails_infowindow
"<img src=\"#{self.picture}\"> #{self.name}"
end
工作。我希望能够在 infowindow /public/images/#{name}.jpg width= 25 height = 32 中执行类似的操作。
我最终想将图像存储在 amazon s3 上,但一直在我本地的 macbook 上工作让流程正常运行。
任何帮助将不胜感激
I have enjoyed using you gmaps_4_rails gem and am impressed with the ease of configuring it. The only problem that I have had and I have spent a great deal of time trying to get it working is how to add an image to an infowindow. I cant get the example:
def gmaps4rails_infowindow
"<img src=\"#{self.picture}\"> #{self.name}"
end
to work. I want to be able to do something like this in the infowindow /public/images/#{name}.jpg width= 25 height = 32.
I eventually want to store the images on amazon s3 but have been working on my local macbook to get the process working.
Any assistance would be greatly appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需执行以下操作:
看看这里以确定您所做的事情:
https://github.com/apneadiving/Google-Maps-for -Rails/wiki/安全警告
Simply do this:
Have a look here to be sure of what you do:
https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Security-Warning