lib/geomancer.rb in geomancer-0.6.0 vs lib/geomancer.rb in geomancer-0.6.1
- old
+ new
@@ -23,9 +23,10 @@
case @engine
when :zip_code then
Geomancer::ZipCode.geolocate(address)
else
+ address = address.gsub(/[\r\n]/,", ") # Yahoo doesn't like newlines
results = Geocoder.search(address)
return nil if results.empty?
first_result = results.first
{:latitude => first_result.latitude, :longitude => first_result.longitude}