views:

36

answers:

3

Hi,

I have a need to provide a widget on a webpage that allows a user to enter in a zipcode or suburb to determine if the website's business delivers to their area (basically are they inside of some range/radius).

Anyone know of any libraries (commercial or opensource that would help achieve this instead of writing my own bit of code. As it may be hosted on different platforms - the thought of a javascript/client side only solution would be best.

Thoughts?

Thanks!

A: 

Also, Google Gears ( http://code.google.com/p/gears/wiki/LocationAPI?redir=1 ) has an API that allows you to pinpoint the location of your visitors, you should check it out.

Claudiu
Direct link is http://code.google.com/apis/gears/api_geolocation.html
bemace
A: 

You can create the service yourself by storing your store locations (lat/long) in your dbms (eg MySQL), then querying the database with the zip code/location.

You will need to convert the user's input (zip code or location) into lat/long. That's called geocoding. There are geocoding services on the net that you can use, but check the license terms.

Easier might be to only accept zip codes (if you're US only). Here's a zip code to an open source lat/long file.

Then query your database. This is a "Geospatial query" These days, it's not hard. A MySQL presentation. More info, a blog post, SO Answer.

Larry K
Really appreciate your leads. Thanks!
sub.contact
I guess if the view is that it's very simple there may not be many products/services that just do it instead of rolling my own solution??
sub.contact
There could be a library to help you. Or, as you say, it is pretty simple these days. The other way to look at it is that libraries do exist for the various parts of the puzzle: the geocoder in particular, and the dbms.
Larry K
A: 

Try this and see if it helps.It is a ZIP Code Locator Software. http://zip-code-locator.com

JaceyKala