lib/geokit/geocoders/ca_geocoder.rb in geokit-1.13.1 vs lib/geokit/geocoders/ca_geocoder.rb in geokit-1.14.0
- old
+ new
@@ -33,10 +33,11 @@
loc
end
# Formats the request in the format acceptable by the CA geocoder.
def self.submit_url(loc)
- args = ["locate=#{Geokit::Inflector.url_escape(loc)}"]
+ loc_str = loc.is_a?(GeoLoc) ? loc.to_geocodeable_s : loc
+ args = ["locate=#{Geokit::Inflector.url_escape(loc_str)}"]
args << "auth=#{key}" if key
args << 'geoit=xml'
'http://geocoder.ca/?' + args.join('&')
end
end