- @vote.rankings.each do |ranking|
- ranking.rank = params['rankings-list'].index(ranking.candidate.id.to_s) + 1
- ranking.save
+ location = GeoKit::Geocoders::IpGeocoder.geocode(voter.ipaddress)
+ next unless location.lng and location.lat
+
+ unless center
+ center = [location.lat, location.lng]
+ @map.center_zoom_init(center, 4)
+ end
+
+ marker = GMarker.new([location.lat,location.lng],
+ :title => "Voter",
+ :info_window => (voter.ipaddress or "unknown") \
+ + " " + voter.vote.votestring)
+ @map.overlay_init(marker)