Permalink
Browse files

Merge branch 'fix-bug-with-empty-accuracy' into integration

  • Loading branch information...
2 parents f9a3f8f + f32dd2b commit d8bb5b3e6ec8c2dbdfd701143ef5669ac81affdf @ewoutvonk ewoutvonk committed Sep 21, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/geokit/geocoder_google_v3.rb
@@ -164,7 +164,7 @@ def self.extract_placemark(placemark)
# Translate accuracy into Yahoo-style token address, street, zip, zip+4, city, state, country
# For Google, 1=low accuracy, 8=high accuracy
- res.accuracy = ACCURACY[placemark['types'][0]] || 0
+ res.accuracy = (ACCURACY[placemark['types'][0]]).to_i # if ACCURACY[placemark['types'][0]] is empty or nil, 0 will be returned
res.precision = %w{unknown country state state city zip zip+4 street address building}[res.accuracy]
# google returns a set of suggested boundaries for the geocoded result

0 comments on commit d8bb5b3

Please sign in to comment.