Topic: Refactor map method (ym4r_gm, geokit)

[code ruby] def map
    @event = Event.find(params[:id])   
    lat = MultiGeocoder.geocode(@event.location).lat
    lng = MultiGeocoder.geocode(@event.location).lng   
    marker = GMarker.new([lat, lng]) 
    @map = GMap.new("map_div_id") 
    @map.control_init(:large_map => true, :map_type => true) 
    @map.center_zoom_init([lat, lng], 10) 
    @map.overlay_init(marker) 
     
    respond_to do |format|
      format.html # map.haml
      format.xml  { render :xml => @event }
    end
  end[/code]
How could I clean this up?

Last edited by knownasilya (2008-11-14 16:28:23)

Re: Refactor map method (ym4r_gm, geokit)

No one? sad