简体   繁体   中英

Geocoding API - Canadian Postal Code

I am passing a Canadian Postal Code and expecting to receive the corresponding Province and City/Town. For the most part it is working, the Province is returned. However, there are times that the correct city or no city are returned.

Example: Postal Code N0L0B2 corresponds to Glencoe, Ontario. However, GeoCode API does not return any city.

https://maps.googleapis.com/maps/api/geocode/json?address=N0L0B2&region=CA&key=KEY_VALUE

T0H 2N2: Corresponds to Northern Sunrise County but API returns Clairmont.

Question 1: Am I invoking API correctly by passing postal code only? That's the only piece of info that I have.

Thanks,

Jesse

Here you go:

https://geocoder.ca/T0H 2N2?json=1

{
"standard": {
"prov": "AB",
"city": "Northern Sunrise County",
"confidence": "0.3"
},
"Dissemination_Area": {
"adauid": "48170016",
"dauid": "48170258"
},
"longt": "-117.237547",
"TimeZone": "America\/Edmonton",
"postal": "T0H2N2",
"AreaCode": "587",
"latt": "55.956189"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM