lib/geocoder/lookups/bing.rb in geocoder-1.0.2 vs lib/geocoder/lookups/bing.rb in geocoder-1.0.3
- old
+ new
@@ -10,10 +10,10 @@
private # ---------------------------------------------------------------
def results(query, reverse = false)
return [] unless doc = fetch_data(query, reverse)
-
+
if doc['statusDescription'] == "OK"
return doc['resourceSets'].first['estimatedTotal'] > 0 ? doc['resourceSets'].first['resources'] : []
else
warn "Bing Geocoding API error: #{doc['statusCode']} (#{doc['statusDescription']})."
return []