Class: Spyro::ActionViewExtension::CollectionForHelper::Output::Map
- Defined in:
- lib/spyro/collections/outputs/map.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Spyro::ActionViewExtension::CollectionForHelper::Output::Base
Instance Method Details
#render ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/spyro/collections/outputs/map.rb', line 11 def render locations = @unicollection.rows.map do |r| r[:data].map(&:value).join(', ') end image_tag "http://maps.googleapis.com/maps/api/staticmap?size=600x300&maptype=roadmap&sensor=false&#{locations.map {|location| "markers=#{location}"}.join('&')}" end |