Nearest Zip Code Search using asp.net

后端 未结 3 1568
暖寄归人
暖寄归人 2020-12-21 11:49

I want to inplement functionallity that will search zip codes, if user enter any zip code than all the zip codes close to entered zip code will be shown. Please let us know

相关标签:
3条回答
  • 2020-12-21 12:13

    I haven't explored it much, but the USPS offers a number of API's and databases. You might want to check out their Address Information API. If anyone has an accurate database, it's probably the USPS.

    https://www.usps.com/business/webtools.htm

    They have some web tools that allow you to manually look up zip codes for a city, so there might be similar functionality you can use.

    0 讨论(0)
  • 2020-12-21 12:20

    I work in the address verification field, where we have some experience doing this) where "ZIP codes" and "geocoding" are buzz-words. For further location accuracy, you will want to consider verifying a complete address and adding the ZIP+4 code. This will provide more relevant results to your user.

    Generally, free services won't provide that kind of value, but there are some affordable options that are officially licensed, or certified, by the USPS, to distribute that data. One such service is LiveAddress (a service I've worked on myself). The ZIP+4 code is more accurate than a generic ZIP code, so you'll get more accurate geolocated results.

    0 讨论(0)
  • 2020-12-21 12:29

    First, grab a free zip code database like this one. This will allow you to convert from an entered zip code to a latitude and longitude. As long as you make latitude and longitude database keys also, you can now look up all the nearby latitudes and longitudes (by moving up and down in the sorted values) and get all ZIP codes within a desired distance.

    Here is an example of how to calculate latitude and longitude distances.

    0 讨论(0)
提交回复
热议问题