Permalink
Browse files

filtering geocoded data before going into each-loop. now your columns…

… are not counted if record is not geocoded. Otherwise it will throw an error if you start with an index wich is not zero.
  • Loading branch information...
1 parent 1620ddd commit 77cc4ce173dd2d7b74d46f5b7e3e6d055cbc5214 @robinboening robinboening committed Oct 24, 2010
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/seer/geomap.rb
View
@@ -90,8 +90,7 @@ def data_mode=(mode) #:nodoc:
def data_table #:nodoc:
@data_table = []
- data.each_with_index do |datum, column|
- next unless datum.geocoded?
+ data.select{ |d| d.geocoded? }.each_with_index do |datum, column|
if data_mode == "markers"
@data_table << [
" data.setValue(#{column}, 0, #{datum.latitude});\r",

0 comments on commit 77cc4ce

Please sign in to comment.