lib/geokit/geocoders/ca_geocoder.rb in geokit-1.8.0 vs lib/geokit/geocoders/ca_geocoder.rb in geokit-1.8.1

- old
+ new

@@ -10,10 +10,11 @@ # <longt>-123.153684</longt> # </geodata> module Geokit module Geocoders class CaGeocoder < Geocoder + config :key private # Template method which does the geocode lookup. def self.do_geocode(loc) @@ -39,10 +40,10 @@ args << "stno=#{loc.street_number}" if loc.street_address args << "addresst=#{Geokit::Inflector::url_escape(loc.street_name)}" if loc.street_address args << "city=#{Geokit::Inflector::url_escape(loc.city)}" if loc.city args << "prov=#{loc.state}" if loc.state args << "postal=#{loc.zip}" if loc.zip - args << "auth=#{Geokit::Geocoders::geocoder_ca}" if Geokit::Geocoders::geocoder_ca + args << "auth=#{key}" if key args << "geoit=xml" 'http://geocoder.ca/?' + args.join('&') end end end