Class: Aureus::Map
- Inherits:
-
Renderable
- Object
- Renderable
- Aureus::Map
- Defined in:
- lib/aureus/map.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Map
constructor
A new instance of Map.
- #render ⇒ Object
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
#initialize(args) ⇒ Map
Returns a new instance of Map.
5 6 7 |
# File 'lib/aureus/map.rb', line 5 def initialize args init args, {} end |
Instance Method Details
#render ⇒ Object
9 10 11 12 13 |
# File 'lib/aureus/map.rb', line 9 def render if @options[:longitude] and @options[:latitude] content_tag("iframe","",:src => "https://maps.google.ch/maps?q="+@options[:latitude].to_s+","+@options[:longitude].to_s+"&ie=UTF8&z=15&output=embed", :width => @options[:width], :height => @options[:height]) end end |