开发者

Determine if the zip code within the required radius

I need to find if the given zip code is within the required radius. For example, if the user has entered 20910, it should be able to determine if it's within 5 mile radius of 20814. Is there a way to do it? Google API or 开发者_运维百科something? Please help.

I'm using C# as the programming language.

Thanks.


You are going to need some source of geodata. Here is an older source that you can download. link . Or you may try Live Local or Google Api services


I don't know Google API support this things, but you can choice off-line solution too; you need for it some database with zipcodes and some LATITUDE/LONGITUDE range for each. Then you can with simple calculations get result what you want.

Pros of off-line choice:

  1. Don't need network connection
  2. Database must exists and must be up-to-date (but this is not often changes, zipcodes)
  3. You are not addicted to Google API.

Cons of off-line choice:

  1. You must write algorithm who determinate by point and area, is this point is in 5mile radius from area, i don't know on what level is your programming experience, for me is easy, for you i dont know, think about you can write it.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜