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:
- Don't need network connection
- Database must exists and must be up-to-date (but this is not often changes, zipcodes)
- You are not addicted to Google API.
Cons of off-line choice:
- 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.
精彩评论