sebpatu
Joined: 09/03/2011 09:34:21
Messages: 1
Offline
|
Hello,
It's quite clear, but very important, i get not same result from postalCodeSearchJSON if i use the free server geonames.org or if i use the paid server geonames.net!
Try yourself: the postalCode 'HA0 01AB' for UK
Request:
http://ws.geonames.org/postalCodeSearchJSON?postalcode=HA0%201AB&maxRows=10&style=FULL&country=GB
Result:
{"postalCodes":[{"adminCode3":"AE","adminName3":"Brent London Boro","adminCode2":"00","adminCode1":"ENG","postalCode":"HA0 1AB","countryCode":"GB","lng":-0.30304759497566464,"placeName":"Alperton Ward","lat":51.539677982092996,"adminName1":"England"}]}
Request:
http://ws.geonames.net/postalCodeSearchJSON?postalcode=HA0%201AB&maxRows=10&style=FULL&country=GB&username=[MyUsername]
Result:
{"postalCodes":[{"adminName2":"Greater London","postalCode":"HA0","countryCode":"GB","lng":-0.2833333,"placeName":"Wembley","lat":51.55},{"adminName2":"Greater London","postalCode":"HA0","countryCode":"GB","lng":-0.30000000000000004,"placeName":"Alperton","lat":51.541666649999996},{"adminName2":"Greater London","postalCode":"HA0","countryCode":"GB","lng":-0.3166667,"placeName":"Sudbury","lat":51.5333333}]}
As you can see, the free server read correctly the full postalCode with space caracter, so it gives only one result, and its the good one.
But the paid server cut the postCode from the space caracter and don't give the good results.
Thanks.
|