Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2007, 12:46 PM
Authorized User
 
Join Date: Oct 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP postcode search (UK)

I need to provide a regional search facility on my site. i.e. user enters UK postcode, and the result is a list of registered locations that are nearest to that postcode.

Is there an off-the-shelf ASP solution for this?

Thanks.

 
Old January 23rd, 2007, 12:53 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Well, let me ask you this: When you say "nearest" how are you determining that? Do you have a series of latitudes and longitudes associated with each location that you could calculate off of or just sets of postal codes?

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old January 23rd, 2007, 01:01 PM
Authorized User
 
Join Date: Oct 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

At the moment I don't have anything.

 
Old January 23rd, 2007, 01:48 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ok. I have only ever done this 1 way (using different languages) by taking the latitude and longitude of a source destination (postal code) and using the Great Circle theory, figure out which other postal codes fell within that circle. (The Great Circle represented distance which i could expand or shirnk ad hoc)

That route requires a bit of math knowledge (specifically trig and geometry) but if this is the way you intend to go and can collect that data id be happy to share my code snippet with you that achieves this.

(Note: using a Great Circle is the most accurate, albeit the most processor heavy, other mathmatical equations exist to do achieve this although not as accurate. Pythagorean theory would be another example)

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions for UK hosting SoloEng BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 June 18th, 2007 08:11 AM
Formatting date search in the UK peterasimpson VB How-To 2 February 20th, 2006 11:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.