Skip to content
Snippets Groups Projects
Commit 4899fb70 authored by Dave Krupinski's avatar Dave Krupinski
Browse files

Enable the :showpostal option for GeocoderCA lookups.

parent 0ead6f9f
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ module Geocoder::Lookup
params[:reverse] = 1
else
params[:locate] = query
params[:showpostal] = 1
end
"http://geocoder.ca/?" + hash_to_query(params)
end
......
......@@ -27,4 +27,11 @@ class LookupTest < Test::Unit::TestCase
g = Geocoder::Lookup::Yahoo.new
assert_match "appid=MY_KEY", g.send(:query_url, "Madison Square Garden, New York, NY 10001, United States")
end
def test_geocoder_ca_showpostal
Geocoder::Configuration.api_key = "MY_KEY"
g = Geocoder::Lookup::GeocoderCa.new
assert_match "showpostal=1", g.send(:query_url, "Madison Square Garden, New York, NY 10001, United States")
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment