Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
@map = Map.new @mapper = GMap.new("map") @mapper.control_init(:large_map => true,:map_type => true) @mapper.center_zoom_init([30.637321,-96.346664],8) @maps = Map.find(:all, :conditions => ["approved = ?", true]) @presenter = MapsPresenter.new(:mapper => @mapper, :maps => @maps, :user => current_user) @mapper.icon_global_init(GIcon.new(:image => "../images/rails.png", :icon_anchor => GPoint.new(7,7), :info_window_anchor => GPoint.new(9,2)), "rails_icon") @rails_icon = Variable.new("rails_icon") @tab1 = GInfoWindowTab.new('INFO', @marker_html) @tab2 = GInfoWindowTab.new('INFO', @marker_html) @window_tabs = [@tab1, @tab2] for map in @maps @window_tabs = @presenter.get_infowindow_html(map) @mapper.overlay_init(GMarker.new([map.lat, map.lng], :title => map.name, :icon => @rails_icon, :info_window_tabs => @window_tabs)) end end
This paste will be private.
From the Design Piracy series on my blog: