Greetings,
I should preface this question by stating that I live in the United States and I have a rudimentary at best understanding of international postal codes. That being said, I noticed what I think is a peculiar occurrence when searching for address candidates using the ESRI World Locator. I searched for an address in Fort Erie, Ontario, Canada using this locator and the JSON result featured only half of the postal code. Here is a part of what was returned:
{ "spatialReference": { "wkid": 102100, "latestWkid": 3857 }, "candidates": [ { "address": "168 Garrison Rd, Fort Erie, Ontario, L2A", "location": { "x": -8785206.4957934171, "y": 5297617.1858132156 }, "score": 100, "attributes": { "Loc_name": "World", "Status": "M", "Score": 100, "Match_addr": "168 Garrison Rd, Fort Erie, Ontario, L2A", "LongLabel": "168 Garrison Rd, Fort Erie, Ontario, L2A, CAN", "ShortLabel": "168 Garrison Rd", "Addr_type": "PointAddress", "Type": "", "PlaceName": "", "Place_addr": "168 Garrison Rd, Fort Erie, Ontario, L2A", "Phone": "", "URL": "", "Rank": 20, "AddBldg": "", "AddNum": "168", "AddNumFrom": "", "AddNumTo": "", "AddRange": "", "Side": "L", "StPreDir": "", "StPreType": "", "StName": "Garrison", "StType": "Rd", "StDir": "", "BldgType": "", "BldgName": "", "LevelType": "", "LevelName": "", "UnitType": "", "UnitName": "", "SubAddr": "", "StAddr": "168 Garrison Rd", "Block": "", "Sector": "", "Nbrhd": "", "District": "Fort Erie", "City": "Fort Erie", "MetroArea": "", "Subregion": "Niagara", "Region": "Ontario", "RegionAbbr": "ON", "Territory": "", "Zone": "", "Postal": "L2A", "PostalExt": "1M4", "Country": "CAN", "LangCode": "ENG", "Distance": 0, "X": -78.918852693173292, "Y": 42.90561948456368, "DisplayX": -78.918862500000003, "DisplayY": 42.905277000000012, "Xmin": -78.919862500000008, "Xmax": -78.917862499999998, "Ymin": 42.904277000000015, "Ymax": 42.90627700000001, "ExInfo": "" }, "extent": { "xmin": -8785318.9069751669, "ymin": 5297413.1613209005, "xmax": -8785096.2679935787, "ymax": 5297717.1135389088 } },This is the URL that produced this result:
https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?token=<token>&f=pjson&singleLine=168+Garrison+Rd%2c+Fort+Erie%2c+ON%2c+Canada&outSR=102100&outfields=*
I have some code that is breaking due to an address with half of a postal code failing validation. I know that I can look for the "postalExt" outfield and get the rest of the postal code in a pinch. Should the address candidate display the entire postal code in its results?