All pastes #988003 Raw Edit

Unnamed

public ruby v1 · immutable
#988003 ·published 2008-04-17 04:19 UTC
rendered paste body
  def list    @map = GMap.new('map_div')    @map.control_init(:large_map => true, :map_type => true)    @map.center_zoom_init([19.5,-99.5],8)    @map.icon_global_init( GIcon.new( :image => "/images/up.png",                                       :icon_size => GSize.new( 16,16 ),                                      :icon_anchor => GPoint.new(8,0),                                      :info_window_anchor => GPoint.new(9,2) ),                            "icon_up")      icon_up = Variable.new("icon_up")    (1..10).each do |offset|      lat = 19 + rand      long = -100 + rand      marker = GMarker.new([lat, long],                                    :title => 'Lugar',                                    :icon => icon_up,                                    :draggable => true,                                    :info_window => "Este es el lugar #{offset}"                           )      @map.declare_init(marker, "marker_#{offset}")      @map.overlay_init(marker)      snippet = 'function () {new Ajax.Updater('url',params)}'      @map.event_init(marker, :dragend, snippet)