开发者

Recommend a web service that handles location within a specific radius?

开发者 https://www.devze.com 2023-01-21 01:35 出处:网络
We have a client that wants a store locator on their website. I\'ve been asked to find a webservice that will allow us to send a zipcode as a request and have it return locations within x radius. We f

We have a client that wants a store locator on their website. I've been asked to find a webservice that will allow us to send a zipcode as a request and have it return locations within x radius. We found this, but it's maintained by a single person, and doesn't look like it gets updated or supported very well. We're looking for something commercial, ideally that updates their zipcode database at least once per quarter, and that has a well-documented API with PHP accessibility. I won't say price isn't an object, but right now we just want some ideas, and my 开发者_StackOverflowgoogle-fu has failed me.

I've already posted this over on the webmasters forum, but thought I'd cover my bases and post here too.


I've repurposed this outstanding script to conquor this same challenge. It's free, has been very reliable, and is relatively quick.

In my script, I have addresses stored in the DB. So rather than show a page to enter addresses, I simply pass them as a string and let the magic happen.

He says it in the app, but ensure that if you go this route you get your own Google Maps API. It won't work with his!

If you want to go a bit less technical approach, here's a MySQL query you could run on your locations (you'd have to add lat/long to your DB or setup a GEOCODING service) to give you distance as the crow flies.


Google Maps has a geocoder as well and it geocodes to the specific address.

It's limited to x number of requests but that shouldn't be a big deal if your site is small and if you cache. You can get more requests if you pay.

It can be accessed via javascript or via PHP (and there are several prewritten PHP modules out there)

Link here: http://code.google.com/apis/maps/documentation/javascript/v2/services.html

(I worked for a company that did upwards of 800,000 requests a day, so it's stable and fast :) )


PostcodeAnywhere has a Store Locator feature - I think it's pay per use, but I've used their other products before and they're very cheap.

http://www.postcodeanywhere.co.uk/store-locator-tool/

0

精彩评论

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