 |
Posted By: Brandon Keepers
Date: 2007-03-20 22:55
Summary: graticule 0.2.0
Project: Graticule
Graticule is an API that provides a common interface to popular geocoding services.
Graticule version 0.2.0 has been released with support for PostcodeAnywhere and Local Search Maps, both which support international addresses.
g = Graticule.service(:postcode_anywhere).new('account, 'license')
g.locate :locality => 'London', :country => 'UK'
Support was also added for geocoding IP addresses:
g = Graticule.service(:host_ip).new
g.locate '64.233.187.99'
More information available at:
http://rubyforge.org/projects/graticule
Feedback is welcome, especially from users outside the US. Sign up for the mailing list at:
http://rubyforge.org/mailman/listinfo/graticule-users
Changes:
0.2.0 (2007-03-17)
* changed city to locality, state to region, and zip to postal_code
* added support for PostcodeAnywhere
* added support for Local Search Maps (James Stewart)
* added IP-based geocoder
* moved geocoders to Graticule::Geocoder namespace
* fixed Google geocoder (again)
* made Yahoo geocoder consistent with others by returning 1 result
* geocoders can how take a Hash (:street, :locality, :region, :postal_code, :country)
or a Graticule::Location for the #locate call
|
|
Forums |
Admin Start New Thread
| Message: 36220 |
 |
BY: Oshoma Momoh (osh) DATE: 2007-12-18 06:50 SUBJECT: Ampersand Geocoding Problem I ran into some trouble using Graticule's google geocoder to geocode street addresses with ampersands in them. For instance, calling geocode for "Grace St & Mansfield Ave, Toronto, ON, CA" returns a US address, while "Grace St and Mansfield Ave, Toronto, ON, CA" works properly.
This apparently stems from a problem in encoding the ampersand within the URI, within Graticule::Geocode::Base.make_url.
Replacing this:
"#{URI.escape k.to_s}=#{URI.escape v.to_s}"
with this:
"#{CGI.escape k.to_s}=#{CGI.escape v.to_s}"
fixes the problem.
I'm not sure if this breaks encoding assumptions for other geocoders, since I'm not able to easily test them all.
Hope this helps others hitting the same problem. | |
Thread View
| Thread |
Author |
Date |
 |
Ampersand Geocoding Problem | Oshoma Momoh | 2007-12-18 06:50 | |
Post a followup to this message
|
 |